Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25494

Assertion `tl->table == __null' failed in bool THD::open_temporary_table(TABLE_LIST*)

    XMLWordPrintable

    Details

      Description

      SET SESSION binlog_format=STATEMENT;
      CREATE TEMPORARY TABLE t (i INT) UNION=(t);
      ALTER TABLE t ADD extrac CHAR(1);
      

      Leads to:

      10.6.0 8751aa7397b2e698fa0b46ec3e60abb9e2fd7e1b (Debug)

      mysqld: /test/10.6_dbg/sql/temporary_tables.cc:333: bool THD::open_temporary_table(TABLE_LIST*): Assertion `tl->table == __null' failed.
      

      10.6.0 8751aa7397b2e698fa0b46ec3e60abb9e2fd7e1b (Debug)

      Core was generated by `/test/GAL_MD200421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --defaults-file=/'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x1518cc0fb700 (LWP 2505443))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055e49bef170f in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x000055e49b686c86 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000015190146c859 in __GI_abort () at abort.c:79
      #6  0x000015190146c729 in __assert_fail_base (fmt=0x151901602588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e49c0bb141 "tl->table == __null", file=0x55e49c0ba8d8 "/test/10.6_dbg/sql/temporary_tables.cc", line=333, function=<optimized out>) at assert.c:92
      #7  0x000015190147df36 in __GI___assert_fail (assertion=assertion@entry=0x55e49c0bb141 "tl->table == __null", file=file@entry=0x55e49c0ba8d8 "/test/10.6_dbg/sql/temporary_tables.cc", line=line@entry=333, function=function@entry=0x55e49c0bae20 "bool THD::open_temporary_table(TABLE_LIST*)") at assert.c:101
      #8  0x000055e49b5eaf87 in THD::open_temporary_table (this=this@entry=0x151894000db8, tl=tl@entry=0x151894013c98) at /test/10.6_dbg/sql/temporary_tables.cc:333
      #9  0x000055e49b5eb4fe in THD::open_temporary_tables (this=this@entry=0x151894000db8, tl=<optimized out>) at /test/10.6_dbg/sql/temporary_tables.cc:475
      #10 0x000055e49ba44725 in wsrep_append_fk_parent_table (thd=thd@entry=0x151894000db8, tables=<optimized out>, tables@entry=0x151894013c98, keys=keys@entry=0x1518cc0f9350) at /test/10.6_dbg/sql/wsrep_mysqld.cc:1615
      #11 0x000055e49b524c65 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x151894000db8) at /test/10.6_dbg/sql/sql_alter.cc:500
      #12 0x000055e49b3c9dbc in mysql_execute_command (thd=thd@entry=0x151894000db8) at /test/10.6_dbg/sql/sql_parse.cc:5986
      #13 0x000055e49b3b03b8 in mysql_parse (thd=thd@entry=0x151894000db8, rawbuf=rawbuf@entry=0x151894013bb0 "ALTER TABLE t ADD extrac CHAR(1)", length=length@entry=32, parser_state=parser_state@entry=0x1518cc0fa410) at /test/10.6_dbg/sql/sql_parse.cc:8017
      #14 0x000055e49b3afd51 in wsrep_mysql_parse (thd=thd@entry=0x151894000db8, rawbuf=0x151894013bb0 "ALTER TABLE t ADD extrac CHAR(1)", length=32, parser_state=parser_state@entry=0x1518cc0fa410) at /test/10.6_dbg/sql/sql_parse.cc:7831
      #15 0x000055e49b3bf26b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151894000db8, packet=packet@entry=0x15189400b369 "ALTER TABLE t ADD extrac CHAR(1)", packet_length=packet_length@entry=32, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
      #16 0x000055e49b3c2653 in do_command (thd=0x151894000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1406
      #17 0x000055e49b51d26d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e49f5683a8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #18 0x000055e49b51d875 in handle_one_connection (arg=arg@entry=0x55e49f5683a8) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #19 0x000055e49b9ce2f7 in pfs_spawn_thread (arg=0x55e49f5dfd68) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #20 0x000015190197a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x0000151901569293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.10 675c22c065110be03a5fab82442d2c3dc32aefff (Debug)

      mysqld: /test/10.5_dbg/sql/temporary_tables.cc:333: bool THD::open_temporary_table(TABLE_LIST*): Assertion `tl->table == __null' failed.
      

      10.5.10 675c22c065110be03a5fab82442d2c3dc32aefff (Debug)

      Core was generated by `/test/GAL_MD200421-mariadb-10.5.10-linux-x86_64-dbg/bin/mysqld --defaults-file='.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14ce5810c700 (LWP 1874890))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055bff1afc1a6 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x000055bff124392e in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014ce8c66a859 in __GI_abort () at abort.c:79
      #6  0x000014ce8c66a729 in __assert_fail_base (fmt=0x14ce8c800588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55bff1cc64e1 "tl->table == __null", file=0x55bff1cc5c78 "/test/10.5_dbg/sql/temporary_tables.cc", line=333, function=<optimized out>) at assert.c:92
      #7  0x000014ce8c67bf36 in __GI___assert_fail (assertion=assertion@entry=0x55bff1cc64e1 "tl->table == __null", file=file@entry=0x55bff1cc5c78 "/test/10.5_dbg/sql/temporary_tables.cc", line=line@entry=333, function=function@entry=0x55bff1cc61c0 "bool THD::open_temporary_table(TABLE_LIST*)") at assert.c:101
      #8  0x000055bff11a7eef in THD::open_temporary_table (this=this@entry=0x14ce14000db8, tl=tl@entry=0x14ce14013dc8) at /test/10.5_dbg/sql/temporary_tables.cc:333
      #9  0x000055bff11a8466 in THD::open_temporary_tables (this=this@entry=0x14ce14000db8, tl=<optimized out>) at /test/10.5_dbg/sql/temporary_tables.cc:475
      #10 0x000055bff1609db3 in wsrep_append_fk_parent_table (thd=thd@entry=0x14ce14000db8, tables=<optimized out>, tables@entry=0x14ce14013dc8, keys=keys@entry=0x14ce5810a2f0) at /test/10.5_dbg/sql/wsrep_mysqld.cc:1293
      #11 0x000055bff10df055 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14ce14000db8) at /test/10.5_dbg/sql/sql_alter.cc:499
      #12 0x000055bff0f81df3 in mysql_execute_command (thd=thd@entry=0x14ce14000db8) at /test/10.5_dbg/sql/sql_parse.cc:6055
      #13 0x000055bff0f67a90 in mysql_parse (thd=thd@entry=0x14ce14000db8, rawbuf=rawbuf@entry=0x14ce14013ce0 "ALTER TABLE t ADD extrac CHAR(1)", length=length@entry=32, parser_state=parser_state@entry=0x14ce5810b3d0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:8099
      #14 0x000055bff0f673bb in wsrep_mysql_parse (thd=thd@entry=0x14ce14000db8, rawbuf=0x14ce14013ce0 "ALTER TABLE t ADD extrac CHAR(1)", length=32, parser_state=parser_state@entry=0x14ce5810b3d0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7902
      #15 0x000055bff0f76d9a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14ce14000db8, packet=packet@entry=0x14ce1400b499 "ALTER TABLE t ADD extrac CHAR(1)", packet_length=packet_length@entry=32, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:1270
      #16 0x000055bff0f7a608 in do_command (thd=0x14ce14000db8) at /test/10.5_dbg/sql/sql_parse.cc:1370
      #17 0x000055bff10d7514 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55bff5a8f158, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1410
      #18 0x000055bff10d7c1b in handle_one_connection (arg=arg@entry=0x55bff5a8f158) at /test/10.5_dbg/sql/sql_connect.cc:1312
      #19 0x000055bff1593747 in pfs_spawn_thread (arg=0x55bff5b1c938) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #20 0x000014ce8cb78609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x000014ce8c767293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4.19 57caff245cbdcbdfda6f022de7f354f05a790656 (Debug)

      mysqld: /test/10.4_dbg/sql/temporary_tables.cc:333: bool THD::open_temporary_table(TABLE_LIST*): Assertion `tl->table == __null' failed.
      

      10.4.19 57caff245cbdcbdfda6f022de7f354f05a790656 (Debug)

      Core was generated by `/test/GAL_MD200421-mariadb-10.4.19-linux-x86_64-dbg/bin/mysqld --defaults-file='.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x151de408f700 (LWP 1816314))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000561cbbf9919d in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:386
      #2  0x0000561cbb6a1cda in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:356
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000151df60a3859 in __GI_abort () at abort.c:79
      #6  0x0000151df60a3729 in __assert_fail_base (fmt=0x151df6239588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x561cbc0ce971 "tl->table == __null", file=0x561cbc0ce0e0 "/test/10.4_dbg/sql/temporary_tables.cc", line=333, function=<optimized out>) at assert.c:92
      #7  0x0000151df60b4f36 in __GI___assert_fail (assertion=assertion@entry=0x561cbc0ce971 "tl->table == __null", file=file@entry=0x561cbc0ce0e0 "/test/10.4_dbg/sql/temporary_tables.cc", line=line@entry=333, function=function@entry=0x561cbc0ce628 "bool THD::open_temporary_table(TABLE_LIST*)") at assert.c:101
      #8  0x0000561cbb602179 in THD::open_temporary_table (this=this@entry=0x151d6c000d90, tl=tl@entry=0x151d6c013310) at /test/10.4_dbg/sql/temporary_tables.cc:333
      #9  0x0000561cbb6026c0 in THD::open_temporary_tables (this=this@entry=0x151d6c000d90, tl=<optimized out>) at /test/10.4_dbg/sql/temporary_tables.cc:470
      #10 0x0000561cbb5e1837 in wsrep_append_fk_parent_table (thd=thd@entry=0x151d6c000d90, tables=<optimized out>, tables@entry=0x151d6c013310, keys=keys@entry=0x151de408c060) at /test/10.4_dbg/sql/wsrep_mysqld.cc:1211
      #11 0x0000561cbb51d193 in Sql_cmd_alter_table::execute (this=0x151d6c013b00, thd=0x151d6c000d90) at /test/10.4_dbg/sql/sql_alter.cc:479
      #12 0x0000561cbb3d321e in mysql_execute_command (thd=thd@entry=0x151d6c000d90) at /test/10.4_dbg/sql/sql_parse.cc:6192
      #13 0x0000561cbb3d5a34 in mysql_parse (thd=thd@entry=0x151d6c000d90, rawbuf=rawbuf@entry=0x151d6c013228 "ALTER TABLE t ADD extrac CHAR(1)", length=length@entry=32, parser_state=parser_state@entry=0x151de408e490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7995
      #14 0x0000561cbb3d6ae9 in wsrep_mysql_parse (thd=thd@entry=0x151d6c000d90, rawbuf=0x151d6c013228 "ALTER TABLE t ADD extrac CHAR(1)", length=32, parser_state=parser_state@entry=0x151de408e490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7799
      #15 0x0000561cbb3d8452 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151d6c000d90, packet=packet@entry=0x151d6c01b661 "ALTER TABLE t ADD extrac CHAR(1)", packet_length=packet_length@entry=32, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1183
      #16 0x0000561cbb3dbcde in do_command (thd=0x151d6c000d90) at /test/10.4_dbg/sql/sql_parse.cc:1373
      #17 0x0000561cbb51688f in do_handle_one_connection (connect=connect@entry=0x561cbec83db0) at /test/10.4_dbg/sql/sql_connect.cc:1412
      #18 0x0000561cbb5169ae in handle_one_connection (arg=0x561cbec83db0) at /test/10.4_dbg/sql/sql_connect.cc:1316
      #19 0x0000151df6660609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x0000151df61a0293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.19 (dbg), 10.5.10-7 (dbg), 10.5.10 (dbg), 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (dbg), 10.3.29 (dbg)

        Attachments

          Activity

            People

            Assignee:
            jplindst Jan Lindström
            Reporter:
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration