1
-- source include/have_binlog_format_row.inc
2
-- source include/master-slave.inc
4
# Bug#12415: DROP of temporary table on master stops slave
6
--echo **** On Master ****
7
CREATE TABLE t1 (a int);
8
CREATE TABLE t2 (a int);
9
CREATE TEMPORARY TABLE t2 (a int, b int);
11
sync_slave_with_master;
12
--echo **** On Slave ****
15
--echo **** On Master ****
16
DROP TABLE t2; # Dropping the temporary table
18
sync_slave_with_master;
19
--echo **** On Slave ****
20
SHOW TABLES; # There should be two tables on the slave
23
--echo **** On Master ****
24
CREATE TEMPORARY TABLE t2 (a int, b int);
26
sync_slave_with_master;
27
--echo **** On Slave ****
30
--echo **** On Master ****
31
# Should drop the non-temporary table t1 and the temporary table t2
33
let $VERSION=`select version()`;
34
--replace_result $VERSION VERSION
35
--replace_regex /table_id: [0-9]+/table_id: #/
38
sync_slave_with_master;
39
--echo **** On Slave ****
45
DROP TABLE IF EXISTS t2;
46
sync_slave_with_master;