config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/binlog/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/binlog/t/binlog_foreign_key_parent_table_deleted.test

################################################################################
# Validate that when a DELETE operation is done on a child table, after the
# parent table was dropped using foreign_key_checks= 0, the server does not crash.
#
# Test:
# 0. Create a parent and child tables.
# 1. Drop parent table with foreign_key_checks= 0.
# 2. Delete a row from the child table with foreign_key_checks= 1.
################################################################################
--source include/have_binlog_format_row.inc

call mtr.add_suppression("InnoDB: Foreign Key referenced table test.t1 not found for foreign table test.t2");

SET @saved_foreign_key_checks= @@session.foreign_key_checks;
SET @@session.foreign_key_checks= 1;

CREATE TABLE t1 (c1 INT PRIMARY KEY);
CREATE TABLE t2 (c1 INT PRIMARY KEY, FOREIGN KEY (c1) REFERENCES t1(c1));

INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);

SET @@session.foreign_key_checks= 0;
DROP TABLE t1;
SET @@session.foreign_key_checks= 1;

DELETE FROM t2 WHERE c1=1;

DROP TABLE t2;

SET @@session.foreign_key_checks= @saved_foreign_key_checks;

Man Man