diff options
author | unknown <marko@hundin.mysql.fi> | 2004-07-15 15:46:22 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-07-15 15:46:22 +0300 |
commit | 139855210b9b1c8ce098ecc40bf66e0057d0c8df (patch) | |
tree | 9393fd73cf98bf7af60cc6f5cc9dc9556efcd0fc /mysql-test/r/innodb.result | |
parent | 9e6f619834527dfa031df16cf494765de3098720 (diff) | |
download | mariadb-git-139855210b9b1c8ce098ecc40bf66e0057d0c8df.tar.gz |
InnoDB: limit the recursion depth for ON (UPDATE|DELETE) CASCADE
(Bug #4446)
innobase/row/row0ins.c:
row_ins_foreign_check_on_constraint(): limit recursion for UPDATE too
mysql-test/r/innodb.result:
Add test for recursion depth limit
mysql-test/t/innodb.test:
Add test for recursion depth limit
Diffstat (limited to 'mysql-test/r/innodb.result')
-rw-r--r-- | mysql-test/r/innodb.result | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 6a67bbc6f8b..c282ec68c78 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1259,3 +1259,15 @@ Cannot delete or update a parent row: a foreign key constraint fails update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; Unknown table 't1' in where clause 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); +delete from t1 where id=0; +Cannot delete or update a parent row: a foreign key constraint fails +delete from t1 where id=15; +delete from t1 where id=0; +drop table t1; |