1-- source include/have_binlog_format_row.inc
2-- source include/master-slave.inc
3
4# Bug#12415: DROP of temporary table on master stops slave
5connection master;
6CREATE TABLE t1 (a int);
7CREATE TABLE t2 (a int);
8CREATE TEMPORARY TABLE t2 (a int, b int);
9SHOW TABLES;
10sync_slave_with_master;
11SHOW TABLES;
12connection master;
13DROP TABLE t2;        # Dropping the temporary table
14SHOW TABLES;
15sync_slave_with_master;
16SHOW TABLES;          # There should be two tables on the slave
17
18connection master;
19CREATE TEMPORARY TABLE t2 (a int, b int);
20SHOW TABLES;
21sync_slave_with_master;
22SHOW TABLES;
23connection master;
24# Should drop the non-temporary table t1 and the temporary table t2
25DROP TABLE t1,t2;
26source include/show_binlog_events.inc;
27SHOW TABLES;
28sync_slave_with_master;
29SHOW TABLES;
30
31--disable_query_log
32--disable_warnings
33connection master;
34DROP TABLE IF EXISTS t2;
35sync_slave_with_master;
36--enable_warnings
37--enable_query_log
38--source include/rpl_end.inc
39