diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-02-17 14:37:17 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-02-17 14:37:17 +0200 |
commit | f04b459fb75b28dd57c7f22bc69588f087956373 (patch) | |
tree | 62f1dd7658c744e961f54d7e8ddfc12869e384b0 /mysql-test/suite/innodb/t/foreign_key.test | |
parent | 8bc5bf2cb6a235e55a8fd9aaaff5d2b18296d37b (diff) | |
parent | cac995ec6f7d23c5b725e6ee19fc4f6ed38561f1 (diff) | |
download | mariadb-git-f04b459fb75b28dd57c7f22bc69588f087956373.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'mysql-test/suite/innodb/t/foreign_key.test')
-rw-r--r-- | mysql-test/suite/innodb/t/foreign_key.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test index 07601adffd9..71290c722d7 100644 --- a/mysql-test/suite/innodb/t/foreign_key.test +++ b/mysql-test/suite/innodb/t/foreign_key.test @@ -821,6 +821,29 @@ eval create table t1($fk_ref int primary key, $fk_field int, $constrs) engine in drop table t1; --enable_query_log +--echo # +--echo # MDEV-27583 InnoDB uses different constants for FK cascade +--echo # error message in SQL vs error log +--echo # + +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); + +--error ER_GET_ERRMSG +DELETE FROM t1 WHERE b = 1; +SHOW WARNINGS; +DROP TABLE t1; + +let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; +let SEARCH_PATTERN= InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15.*; +-- source include/search_pattern_in_file.inc + --echo # End of 10.2 tests # MDEV-21792 Server aborts upon attempt to create foreign key on spatial field |