MTR testcase for 5.6. Does not fail at exact same place, but the assert is the same, I believe it's the same root cause (THD::in_use reset in I_S query)
SET DEBUG_SYNC= 'now WAIT_FOR optimize_ready';
SET DEBUG_SYNC= 'after_global_temp_table_in_use_reset SIGNAL i_s_stopped WAIT_FOR optimize_completed';
send SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_TEMPORARY_TABLES;
connection default;
reap;
SET DEBUG_SYNC= 'now SIGNAL optimize_completed';
MTR testcase for 5.6. Does not fail at exact same place, but the assert is the same, I believe it's the same root cause (THD::in_use reset in I_S query)
=== modified file 'Percona- Server/ sql/sql_ show.cc' Server/ sql/sql_ show.cc 2013-06-27 15:15:35 +0000 Server/ sql/sql_ show.cc 2013-07-30 15:01:06 +0000
--- Percona-
+++ Percona-
@@ -4039,6 +4045,7 @@
THD *t= tmp->in_use; global_ temp_table_ in_use_ reset") ;
tmp->in_use= thd;
+ DEBUG_SYNC(thd, "after_
if (store_ temporary_ table_record( thd_item, tables->table, tmp,
thd- >lex->select_ lex.db) ) {
# Test for bug 1113388 (field.cc:3822: virtual longlong Field_long: :val_int( ): Assertion `table->in_use == _current_thd()' failed)
--source include/ have_innodb. inc have_debug_ sync.inc
--source include/
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET DEBUG_SYNC= 'after_ copy_data_ between_ tables_ one_row SIGNAL optimize_ready WAIT_FOR i_s_stopped';
send OPTIMIZE TABLE t1;
connect (conn2, localhost, root,,) ;
connection conn2;
SET DEBUG_SYNC= 'now WAIT_FOR optimize_ready'; global_ temp_table_ in_use_ reset SIGNAL i_s_stopped WAIT_FOR optimize_ completed' ; SCHEMA. GLOBAL_ TEMPORARY_ TABLES;
SET DEBUG_SYNC= 'after_
send SELECT COUNT(*) FROM INFORMATION_
connection default; completed' ;
reap;
SET DEBUG_SYNC= 'now SIGNAL optimize_
connection conn2;
reap;
disconnect conn2;
connection default;
DROP TABLE t1;