diff options
author | marko@hundin.mysql.fi <> | 2004-07-15 15:46:22 +0300 |
---|---|---|
committer | marko@hundin.mysql.fi <> | 2004-07-15 15:46:22 +0300 |
commit | 20b60510e9f5c33eaf19409973b2d06d7580f0f2 (patch) | |
tree | 9393fd73cf98bf7af60cc6f5cc9dc9556efcd0fc /mysql-test/t | |
parent | 0614f8c718a23da7d24a6745d9f2cdc611999e81 (diff) | |
download | mariadb-git-20b60510e9f5c33eaf19409973b2d06d7580f0f2.tar.gz |
InnoDB: limit the recursion depth for ON (UPDATE|DELETE) CASCADE
(Bug #4446)
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/innodb.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 04642ddd619..34eabcc22df 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -896,3 +896,17 @@ update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id --error 1109 update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; drop table t3,t2,t1; + +create table t1( + id int primary key, + pid int, + index(pid), + foreign key(pid) references t1(id) on delete cascade) type=innodb; +insert into t1 values(0,0),(1,0),(2,1),(3,2),(4,3),(5,4),(6,5),(7,6), + (8,7),(9,8),(10,9),(11,10),(12,11),(13,12),(14,13),(15,14); +-- error 1217 +delete from t1 where id=0; +delete from t1 where id=15; +delete from t1 where id=0; + +drop table t1; |