Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2(EOL)
-
10.2.12, 10.2.14
Description
10.2 ca3c8d9b58fdc267b |
mysqld: /data/src/10.2/sql/sql_base.cc:2153: void Locked_tables_list::unlock_locked_tables(THD*): Assertion `thd->transaction.stmt.is_empty()' failed.
|
170926 17:12:24 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f4a73b09ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x000055baadf8c00a in Locked_tables_list::unlock_locked_tables (this=0x7f4a10004510, thd=0x7f4a10000b00) at /data/src/10.2/sql/sql_base.cc:2153
|
#9 0x000055baadf8c08f in Locked_tables_list::unlock_locked_table (this=0x7f4a10004510, thd=0x7f4a10000b00, mdl_ticket=0x0) at /data/src/10.2/sql/sql_base.cc:2196
|
#10 0x000055baae0c61f4 in mysql_create_table (thd=0x7f4a10000b00, create_table=0x7f4a10012588, create_info=0x7f4a64762920, alter_info=0x7f4a64762870) at /data/src/10.2/sql/sql_table.cc:5121
|
#11 0x000055baadffeabd in mysql_execute_command (thd=0x7f4a10000b00) at /data/src/10.2/sql/sql_parse.cc:3966
|
#12 0x000055baae00b24a in mysql_parse (thd=0x7f4a10000b00, rawbuf=0x7f4a10012438 "CREATE OR REPLACE TEMPORARY TABLE t1 (d INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED", length=80, parser_state=0x7f4a64763200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7875
|
#13 0x000055baadff8efb in dispatch_command (command=COM_QUERY, thd=0x7f4a10000b00, packet=0x7f4a1013ea71 "CREATE OR REPLACE TEMPORARY TABLE t1 (d INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED", packet_length=80, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1812
|
#14 0x000055baadff7875 in do_command (thd=0x7f4a10000b00) at /data/src/10.2/sql/sql_parse.cc:1360
|
#15 0x000055baae144ae1 in do_handle_one_connection (connect=0x55bab2530340) at /data/src/10.2/sql/sql_connect.cc:1354
|
#16 0x000055baae14486e in handle_one_connection (arg=0x55bab2530340) at /data/src/10.2/sql/sql_connect.cc:1260
|
#17 0x000055baae561616 in pfs_spawn_thread (arg=0x55bab253a8b0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
|
#18 0x00007f4a75a4e494 in start_thread (arg=0x7f4a64764700) at pthread_create.c:333
|
#19 0x00007f4a73bc693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
--source include/have_innodb.inc
|
|
CREATE TEMPORARY TABLE t1 (a INT) ENGINE=InnoDB; |
CREATE TEMPORARY TABLE t2 (b INT, c INT) ENGINE=InnoDB ROW_FORMAT=COMPACT; |
LOCK TABLE t2 WRITE; |
ALTER TABLE t2 DROP COLUMN c; |
CREATE OR REPLACE TEMPORARY TABLE t1 (d INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; |
Reproducible on older 10.2 builds too.
First noticed some time around MDEV-10813 development.
No visible problems on non-debug builds.
Attachments
Issue Links
- blocks
-
MDEV-13900 Testing for MDEV-11369 (instant ADD COLUMN)
-
- Closed
-
- is duplicated by
-
MDEV-16794 Assertion `thd->transaction.stmt.is_empty()' failed in Locked_tables_list::unlock_locked_tables upon ALTER TABLE
-
- Closed
-
-
MDEV-17314 Assertion `thd->transaction.stmt.is_empty()' failed in Locked_tables_list::unlock_locked_tables upon CREATE OR REPLACE TEMPORARY TABLE
-
- Closed
-
Here is another test case, which does not involve temporary tables.
--source include/have_innodb.inc
# Cleanup
UNLOCK TABLES;
10.2 0c4d11e8199 debug
mysqld: /data/src/10.2/sql/sql_base.cc:2153: void Locked_tables_list::unlock_locked_tables(THD*): Assertion `thd->transaction.stmt.is_empty()' failed.
171117 19:36:45 [ERROR] mysqld got signal 6 ;
#7 0x00007f1392de0ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x00005555d7b6ea84 in Locked_tables_list::unlock_locked_tables (this=0x7f1340004510, thd=0x7f1340000b00) at /data/src/10.2/sql/sql_base.cc:2153
#9 0x00005555d7b6ede1 in Locked_tables_list::unlink_all_closed_tables (this=0x7f1340004510, thd=0x7f1340000b00, lock=0x0, reopen_count=0) at /data/src/10.2/sql/sql_base.cc:2330
#10 0x00005555d7b6eeaf in Locked_tables_list::reopen_tables (this=0x7f1340004510, thd=0x7f1340000b00) at /data/src/10.2/sql/sql_base.cc:2364
#11 0x00005555d7caed11 in mysql_inplace_alter_table (thd=0x7f1340000b00, table_list=0x7f1340012530, table=0x7f1340132430, altered_table=0x7f134011ee30, ha_alter_info=0x7f138c24b610, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f138c24b680, alter_ctx=0x7f138c24c240) at /data/src/10.2/sql/sql_table.cc:7458
#12 0x00005555d7cb3bab in mysql_alter_table (thd=0x7f1340000b00, new_db=0x7f1340012b40 "test", new_name=0x0, create_info=0x7f138c24ce50, table_list=0x7f1340012530, alter_info=0x7f138c24cda0, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9324
#13 0x00005555d7d2cc9c in Sql_cmd_alter_table::execute (this=0x7f1340012c08, thd=0x7f1340000b00) at /data/src/10.2/sql/sql_alter.cc:324
#14 0x00005555d7be920e in mysql_execute_command (thd=0x7f1340000b00) at /data/src/10.2/sql/sql_parse.cc:6197
#15 0x00005555d7bedabe in mysql_parse (thd=0x7f1340000b00, rawbuf=0x7f1340012448 "ALTER TABLE t1 ADD UNIQUE(i)", length=28, parser_state=0x7f138c24e200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7869
#16 0x00005555d7bdba4a in dispatch_command (command=COM_QUERY, thd=0x7f1340000b00, packet=0x7f13400088a1 "ALTER TABLE t1 ADD UNIQUE(i)", packet_length=28, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1805
#17 0x00005555d7bda3a8 in do_command (thd=0x7f1340000b00) at /data/src/10.2/sql/sql_parse.cc:1360
#18 0x00005555d7d2798d in do_handle_one_connection (connect=0x5555dac6c2d0) at /data/src/10.2/sql/sql_connect.cc:1354
#19 0x00005555d7d2771a in handle_one_connection (arg=0x5555dac6c2d0) at /data/src/10.2/sql/sql_connect.cc:1260
#20 0x00005555d8144e1a in pfs_spawn_thread (arg=0x5555dac76840) at /data/src/10.2/storage/perfschema/pfs.cc:1863
#21 0x00007f1394ab7494 in start_thread (arg=0x7f138c24f700) at pthread_create.c:333
#22 0x00007f1392e9d93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
10.2 0c4d11e8199f4c non-debug
#2 <signal handler called>
#3 default_column_bitmaps (this=0x0) at /data/src/10.2/sql/table.h:1374
#4 handler::ha_reset (this=0x7fd404093dc0) at /data/src/10.2/sql/handler.cc:5952
#5 0x0000561598ed3428 in THD::mark_tmp_table_as_free_for_reuse (this=this@entry=0x7fd4040009a8, table=0x7fd404093228) at /data/src/10.2/sql/temporary_tables.cc:766
#6 0x0000561598ed479d in THD::mark_tmp_tables_as_free_for_reuse (this=this@entry=0x7fd4040009a8) at /data/src/10.2/sql/temporary_tables.cc:727
#7 0x0000561598d4f667 in close_thread_tables (thd=thd@entry=0x7fd4040009a8) at /data/src/10.2/sql/sql_base.cc:792
#8 0x0000561598d502e0 in Locked_tables_list::unlock_locked_tables (this=0x7fd404004200, thd=0x7fd4040009a8) at /data/src/10.2/sql/sql_base.cc:2154
#9 0x0000561598d51b67 in Locked_tables_list::reopen_tables (this=this@entry=0x7fd404004200, thd=thd@entry=0x7fd4040009a8) at /data/src/10.2/sql/sql_base.cc:2364
#10 0x0000561598e204cd in mysql_inplace_alter_table (target_mdl_request=0x7fd45c4b7cf0, alter_ctx=0x7fd45c4b88b0, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, ha_alter_info=0x7fd45c4b7c60, altered_table=0x7fd404093228, table=0x7fd4040b6348, table_list=0x7fd40400f0f8, thd=0x7fd4040009a8) at /data/src/10.2/sql/sql_table.cc:7458
#11 mysql_alter_table (thd=0x7fd4040009a8, new_db=<optimized out>, new_name=<optimized out>, create_info=<optimized out>, table_list=0x7fd40400f0f8, alter_info=<optimized out>, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9324
#12 0x0000561598e67ee5 in Sql_cmd_alter_table::execute (this=0x7fd404093dc0, thd=0x7fd4040009a8) at /data/src/10.2/sql/sql_alter.cc:324
#13 0x0000561598d93ad9 in mysql_execute_command (thd=0x7fd4040009a8) at /data/src/10.2/sql/sql_parse.cc:6197
#14 0x0000561598d9a7e9 in mysql_parse (thd=0x7fd4040009a8, rawbuf=<optimized out>, length=28, parser_state=0x7fd45c4bb240, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.2/sql/sql_parse.cc:7869
#15 0x0000561598d9d244 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fd4040009a8, packet=packet@entry=0x7fd404006c69 "ALTER TABLE t1 ADD UNIQUE(i)", packet_length=packet_length@entry=28, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:1805
#16 0x0000561598d9dae3 in do_command (thd=0x7fd4040009a8) at /data/src/10.2/sql/sql_parse.cc:1360
#17 0x0000561598e65224 in do_handle_one_connection (connect=connect@entry=0x56159afba698) at /data/src/10.2/sql/sql_connect.cc:1354
#18 0x0000561598e653c4 in handle_one_connection (arg=arg@entry=0x56159afba698) at /data/src/10.2/sql/sql_connect.cc:1260
#19 0x0000561599124964 in pfs_spawn_thread (arg=0x56159af6eee8) at /data/src/10.2/storage/perfschema/pfs.cc:1863
#20 0x00007fd465423494 in start_thread (arg=0x7fd45c4bc700) at pthread_create.c:333
#21 0x00007fd46380993f in clone () from /lib/x86_64-linux-gnu/libc.so.6