| 1 |
call mtr.add_suppression("Foreign Key referenced table test.t1 not found for foreign table test.t2"); |
| 2 |
SET @saved_foreign_key_checks= @@session.foreign_key_checks; |
| 3 |
SET @@session.foreign_key_checks= 1; |
| 4 |
CREATE TABLE t1 (c1 INT PRIMARY KEY); |
| 5 |
CREATE TABLE t2 (c1 INT PRIMARY KEY, FOREIGN KEY (c1) REFERENCES t1(c1)); |
| 6 |
INSERT INTO t1 VALUES (1); |
| 7 |
INSERT INTO t2 VALUES (1); |
| 8 |
SET @@session.foreign_key_checks= 0; |
| 9 |
DROP TABLE t1; |
| 10 |
SET @@session.foreign_key_checks= 1; |
| 11 |
DELETE FROM t2 WHERE c1=1; |
| 12 |
DROP TABLE t2; |
| 13 |
SET @@session.foreign_key_checks= @saved_foreign_key_checks; |