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