[MDEV-13553] Assertion `thd->transaction.stmt.is_empty() || thd->in_sub_stmt || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' failed in close_thread_tables Created: 2017-08-16  Updated: 2018-05-16  Resolved: 2018-05-16

Status: Closed
Project: MariaDB Server
Component/s: Admin statements, Storage Engine - Aria
Affects Version/s: 10.1, 10.2
Fix Version/s: 10.0.36, 10.1.34

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-12466 Assertion `thd->transaction.stmt.is_e... Closed

 Description   

--source include/have_innodb.inc
 
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
CREATE TABLE t2 (i INT) ENGINE=Aria;
FLUSH TABLE t1, t2 FOR EXPORT;
 
# Cleanup
UNLOCK TABLES;
DROP TABLE t1, t2;

10.1 48fe832650

mysqld: /data/src/10.1/sql/sql_base.cc:935: void close_thread_tables(THD*): Assertion `thd->transaction.stmt.is_empty() || thd->in_sub_stmt || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' failed.
170816 16:47:59 [ERROR] mysqld got signal 6 ;
 
#7  0x00007faed190cee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000562f47a0e65e in close_thread_tables (thd=0x7faec83c7070) at /data/src/10.1/sql/sql_base.cc:934
#9  0x0000562f47be06cc in flush_tables_with_read_lock (thd=0x7faec83c7070, all_tables=0x7faebb8fa170) at /data/src/10.1/sql/sql_reload.cc:593
#10 0x0000562f47a7fcc1 in mysql_execute_command (thd=0x7faec83c7070) at /data/src/10.1/sql/sql_parse.cc:4829
#11 0x0000562f47a86f2b in mysql_parse (thd=0x7faec83c7070, rawbuf=0x7faebb8fa088 "FLUSH TABLE t1, t2 FOR EXPORT", length=29, parser_state=0x7faed3bee5e0) at /data/src/10.1/sql/sql_parse.cc:7344
#12 0x0000562f47a75e8a in dispatch_command (command=COM_QUERY, thd=0x7faec83c7070, packet=0x7faeca319071 "FLUSH TABLE t1, t2 FOR EXPORT", packet_length=29) at /data/src/10.1/sql/sql_parse.cc:1484
#13 0x0000562f47a74c27 in do_command (thd=0x7faec83c7070) at /data/src/10.1/sql/sql_parse.cc:1106
#14 0x0000562f47bacfa1 in do_handle_one_connection (thd_arg=0x7faec83c7070) at /data/src/10.1/sql/sql_connect.cc:1349
#15 0x0000562f47bacd05 in handle_one_connection (arg=0x7faec83c7070) at /data/src/10.1/sql/sql_connect.cc:1261
#16 0x0000562f47f64cf2 in pfs_spawn_thread (arg=0x7faeca2e2970) at /data/src/10.1/storage/perfschema/pfs.cc:1860
#17 0x00007faed387e494 in start_thread (arg=0x7faed3befb00) at pthread_create.c:333
#18 0x00007faed19c993f in clone () from /lib/x86_64-linux-gnu/libc.so.6



 Comments   
Comment by Sergey Vojtovich [ 2018-03-10 ]

monty, you fixed this in 10.2 in revision 0a44ae6528d1fdb2d4a9dab1be7e36931eac8236.
10.1 still crashes. Should we backport your change?

Comment by Michael Widenius [ 2018-04-05 ]

ok to backport

Comment by Michael Widenius [ 2018-05-16 ]

Backported patch from 10.2 to 10.0

Generated at Thu Feb 08 08:06:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.