diff options
Diffstat (limited to 'mysql-test/r/trigger-trans.result')
-rw-r--r-- | mysql-test/r/trigger-trans.result | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/trigger-trans.result b/mysql-test/r/trigger-trans.result index cd5f629564f..dccaa27c5fd 100644 --- a/mysql-test/r/trigger-trans.result +++ b/mysql-test/r/trigger-trans.result @@ -140,4 +140,23 @@ select * from t3; c 1 drop table t1, t2, t3; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=innodb; +CREATE TABLE t2(b INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=innodb; +INSERT INTO t1 VALUES (1); +CREATE TRIGGER t1_bd BEFORE DELETE ON t1 FOR EACH ROW SET @a = 1; +CREATE TRIGGER t1_ad AFTER DELETE ON t1 FOR EACH ROW SET @b = 1; +SET @a = 0; +SET @b = 0; +TRUNCATE t1; +SELECT @a, @b; +@a @b +0 0 +INSERT INTO t1 VALUES (1); +DELETE FROM t1; +SELECT @a, @b; +@a @b +1 1 +DROP TABLE t2, t1; End of 5.0 tests |