1
source include/master-slave.inc;
2
source include/have_innodb.inc;
3
source include/have_debug.inc;
4
source include/have_debug_sync.inc;
5
source include/have_binlog_format_mixed_or_statement.inc;
8
--echo # BUG#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends
10
--echo # If a temporary table is created or dropped, the transaction should be
11
--echo # regarded similarly that a non-transactional table is modified. So
12
--echo # STOP SLAVE should wait until the transaction has finished.
14
CREATE TABLE t1(c1 INT) ENGINE=InnoDB;
15
CREATE TABLE t2(c1 INT) ENGINE=InnoDB;
17
sync_slave_with_master;
18
SET DEBUG_SYNC= 'RESET';
19
source include/stop_slave.inc;
22
--echo # Suspend the INSERT statement in current transaction on SQL thread.
23
--echo # It guarantees that SQL thread is applying the transaction when
24
--echo # STOP SLAVE command launchs.
25
let $debug_save= `SELECT @@GLOBAL.debug`;
26
SET GLOBAL debug= 'd,after_mysql_insert';
27
source include/start_slave.inc;
30
--echo # CREATE TEMPORARY TABLE with InnoDB engine
31
--echo # -----------------------------------------
32
let $tmp_table_stm= CREATE TEMPORARY TABLE tt1(c1 INT) ENGINE = InnoDB;
33
source extra/rpl_tests/rpl_stop_slave.test;
36
--echo # CREATE TEMPORARY TABLE with MyISAM engine
37
--echo # -----------------------------------------
38
let $tmp_table_stm= CREATE TEMPORARY TABLE tt1(c1 INT) ENGINE = MyISAM;
39
source extra/rpl_tests/rpl_stop_slave.test;
42
--echo # CREATE TEMPORARY TABLE ... SELECT with InnoDB engine
43
--echo # ----------------------------------------------------
44
let $tmp_table_stm= CREATE TEMPORARY TABLE tt1(c1 INT) ENGINE = InnoDB
46
source extra/rpl_tests/rpl_stop_slave.test;
49
--echo # CREATE TEMPORARY TABLE ... SELECT with MyISAM engine
50
--echo # ----------------------------------------------------
51
let $tmp_table_stm= CREATE TEMPORARY TABLE tt1(c1 INT) ENGINE = MyISAM
53
source extra/rpl_tests/rpl_stop_slave.test;
56
SET GLOBAL debug= '$debug_save';
60
source include/master-slave-end.inc;