1# Test case for bug #77684 (DROP TABLE IF EXISTS may brake replication if slave has replication filters) 2--source include/have_innodb.inc 3--source include/master-slave.inc 4 5# Test A (using fully-qualified table names) 6--connection master 7CREATE DATABASE db1; 8 9CREATE TABLE db1.t1a (ID bigint(20) primary key) ENGINE=InnoDB; 10 11CREATE TABLE db1.t2a (ID bigint(20) NOT NULL AUTO_INCREMENT, DIVISION_ID bigint(20) DEFAULT NULL, PRIMARY KEY (ID), KEY FK_T1A (DIVISION_ID), CONSTRAINT FK_T1A FOREIGN KEY (DIVISION_ID) REFERENCES db1.t1a (ID) ON DELETE CASCADE) ENGINE=InnoDB; 12 13--error ER_ROW_IS_REFERENCED 14DROP TABLE IF EXISTS db1.t1a; 15 16--sync_slave_with_master 17 18# Test B (using "USE" statement) 19--connection master 20USE db1; 21 22CREATE TABLE t1b (ID bigint(20) primary key) ENGINE=InnoDB; 23 24CREATE TABLE t2b (ID bigint(20) NOT NULL AUTO_INCREMENT, DIVISION_ID bigint(20) DEFAULT NULL, PRIMARY KEY (ID), KEY FK_T1B (DIVISION_ID), CONSTRAINT FK_T1B FOREIGN KEY (DIVISION_ID) REFERENCES t1b (ID) ON DELETE CASCADE) ENGINE=InnoDB; 25 26--error ER_ROW_IS_REFERENCED 27DROP TABLE IF EXISTS t1b; 28 29--sync_slave_with_master 30 31--connection master 32DROP DATABASE db1; 33 34--source include/rpl_end.inc 35