|
Ran into this one also. Similar testcase
USE test;
|
CREATE TABLE t1 (c INT);
|
CREATE TABLE t2 (c INT);
|
LOCK TABLES t1 WRITE,t2 WRITE;
|
CREATE TABLE IF NOT EXISTS t1 LIKE t2;
|
Leads to:
|
10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug)
|
mysqld: /test/10.4_dbg/sql/sql_table.cc:5781: bool mysql_create_like_table(THD*, TABLE_LIST*, TABLE_LIST*, Table_specification_st*): Assertion `(create_info->tmp_table()) || thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db.str, table->table_name.str, MDL_EXCLUSIVE)' failed.
|
|
10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug)
|
Core was generated by `/test/MD110820-mariadb-10.4.15-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
|
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
[Current thread is 1 (Thread 0x14a83ee5b700 (LWP 3970272))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
#1 0x000055b7470998a6 in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:482
|
#2 0x000055b746815cdc in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:343
|
#3 <signal handler called>
|
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
|
#5 0x000014a83d0f28b1 in __GI_abort () at abort.c:79
|
#6 0x000014a83d0e242a in __assert_fail_base (fmt=0x14a83d269a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55b7471a8f18 "(create_info->tmp_table()) || thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db.str, table->table_name.str, MDL_EXCLUSIVE)", file=file@entry=0x55b7471a8028 "/test/10.4_dbg/sql/sql_table.cc", line=line@entry=5781, function=function@entry=0x55b7471aa7c0 <mysql_create_like_table(THD*, TABLE_LIST*, TABLE_LIST*, Table_specification_st*)::__PRETTY_FUNCTION__> "bool mysql_create_like_table(THD*, TABLE_LIST*, TABLE_LIST*, Table_specification_st*)") at assert.c:92
|
#7 0x000014a83d0e24a2 in __GI___assert_fail (assertion=assertion@entry=0x55b7471a8f18 "(create_info->tmp_table()) || thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db.str, table->table_name.str, MDL_EXCLUSIVE)", file=file@entry=0x55b7471a8028 "/test/10.4_dbg/sql/sql_table.cc", line=line@entry=5781, function=function@entry=0x55b7471aa7c0 <mysql_create_like_table(THD*, TABLE_LIST*, TABLE_LIST*, Table_specification_st*)::__PRETTY_FUNCTION__> "bool mysql_create_like_table(THD*, TABLE_LIST*, TABLE_LIST*, Table_specification_st*)") at assert.c:101
|
#8 0x000055b746627575 in mysql_create_like_table (thd=thd@entry=0x14a816c15070, table=table@entry=0x14a816c6d198, src_table=src_table@entry=0x14a816c6d898, create_info=create_info@entry=0x14a83ee58010) at /test/10.4_dbg/sql/sql_table.cc:5778
|
#9 0x000055b74662824b in Sql_cmd_create_table_like::execute (this=0x14a816c6d138, thd=0x14a816c15070) at /test/10.4_dbg/sql/sql_table.cc:11469
|
#10 0x000055b74656aa3d in mysql_execute_command (thd=thd@entry=0x14a816c15070) at /test/10.4_dbg/sql/sql_parse.cc:6098
|
#11 0x000055b74656d090 in mysql_parse (thd=thd@entry=0x14a816c15070, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14a83ee5a460, 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:7896
|
#12 0x000055b74656f920 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14a816c15070, packet=packet@entry=0x14a816c57071 "CREATE TABLE IF NOT EXISTS t1 LIKE t2", packet_length=packet_length@entry=37, 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:1834
|
#13 0x000055b74657335b in do_command (thd=0x14a816c15070) at /test/10.4_dbg/sql/sql_parse.cc:1352
|
#14 0x000055b74669f8b6 in do_handle_one_connection (connect=connect@entry=0x14a83bc35790) at /test/10.4_dbg/sql/sql_connect.cc:1412
|
#15 0x000055b74669f9d6 in handle_one_connection (arg=0x14a83bc35790) at /test/10.4_dbg/sql/sql_connect.cc:1316
|
#16 0x000014a83e0596db in start_thread (arg=0x14a83ee5b700) at pthread_create.c:463
|
#17 0x000014a83d1d3a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.1.47 (dbg), 10.2.34 (dbg), 10.3.25 (dbg), 10.4.15 (dbg), 10.5.6 (dbg)
MySQL: 5.5.62 (dbg)
Bug confirmed not present in:
MariaDB: 10.1.47 (opt), 10.2.34 (opt), 10.3.25 (opt), 10.4.15 (opt), 10.5.6 (opt)
MySQL: 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
|