summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r/foreign_key.result
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-02-17 11:58:25 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-02-17 11:58:25 +0200
commitcac995ec6f7d23c5b725e6ee19fc4f6ed38561f1 (patch)
treeec7be6811f5cf5f08676d0f2b5bc6671689a0347 /mysql-test/suite/innodb/r/foreign_key.result
parent5948d7602ec7f61937c368dcb134e6ec226a2990 (diff)
parent6f4740fde709b94681bab6d66317ddabeac2c252 (diff)
downloadmariadb-git-cac995ec6f7d23c5b725e6ee19fc4f6ed38561f1.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'mysql-test/suite/innodb/r/foreign_key.result')
-rw-r--r--mysql-test/suite/innodb/r/foreign_key.result23
1 files changed, 21 insertions, 2 deletions
diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result
index 1968661b45a..00af01d9501 100644
--- a/mysql-test/suite/innodb/r/foreign_key.result
+++ b/mysql-test/suite/innodb/r/foreign_key.result
@@ -655,9 +655,9 @@ START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
DELETE IGNORE FROM t1 WHERE b = 1;
Warnings:
-Warning 152 InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 20. Please drop extra constraints and try again
+Warning 152 InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15. Please drop extra constraints and try again
Warning 1296 Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`b`) ON DELETE CASCADE' from InnoDB
-Warning 152 InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 20. Please drop extra constraints and try again
+Warning 152 InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15. Please drop extra constraints and try again
Warning 1296 Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`b`) ON DELETE CASCADE' from InnoDB
SELECT a FROM t1 FORCE INDEX(a);
a
@@ -808,6 +808,25 @@ ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint
Parsing foreign keys 3...
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
Parsing foreign keys 4...
+#
+# MDEV-27583 InnoDB uses different constants for FK cascade
+# error message in SQL vs error log
+#
+CREATE TABLE t1
+(a INT, b INT, KEY(b),
+CONSTRAINT FOREIGN KEY (a) REFERENCES t1 (b) ON DELETE CASCADE)
+ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES
+(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),
+(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,1),(1,0);
+DELETE FROM t1 WHERE b = 1;
+ERROR HY000: Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`b`) ON DELETE CASCADE' from InnoDB
+SHOW WARNINGS;
+Level Code Message
+Warning 152 InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15. Please drop extra constraints and try again
+Error 1296 Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`b`) ON DELETE CASCADE' from InnoDB
+DROP TABLE t1;
+FOUND 1 /InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15.*/ in mysqld.1.err
# End of 10.2 tests
CREATE TABLE t1 (a GEOMETRY, INDEX(a(8)),
FOREIGN KEY (a) REFERENCES x (xx)) ENGINE=InnoDB;