--source include/have_innodb.inc --source include/master-slave.inc # Clean up old slave's binlogs (see rpl_temporary.test for explanation). save_master_pos; connection slave; sync_with_master; reset master; --echo # --echo # MDEV-5535: Cannot reopen temporary table --echo # connection master; --disable_query_log CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); --enable_query_log disable_warnings; DROP TABLE IF EXISTS t1, t2, t3; enable_warnings; CREATE TEMPORARY TABLE t1(c1 INT) ENGINE=INNODB; INSERT INTO t1 VALUES (1), (2), (3), (4), (5); CREATE TEMPORARY TABLE t2 SELECT A.c1 a, B.c1 b FROM t1 AS A, t1 AS B; CREATE TABLE t3 SELECT * FROM t2; SELECT COUNT(*) = 5 FROM t1; SELECT COUNT(*) = 25 FROM t2; SELECT COUNT(*) = 25 FROM t3; sync_slave_with_master; SELECT COUNT(*) = 25 FROM t3; connection master; DROP TABLE t1, t2, t3; sync_slave_with_master; --source include/rpl_end.inc