summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test
index 53db1723325..2c4af75e020 100644
--- a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test
+++ b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test
@@ -57,5 +57,22 @@ select count(*) from t1 /* must be zero */;
connection master;
drop table t2,t1;
+set foreign_key_checks=1;
+
+--echo #
+--echo # MDEV-25530 Error 1451 on slave: Cannot delete or update a parent row: a foreign key constraint fails
+--echo #
+
+create table t1 (id int primary key)engine=innodb;
+create table t2 (id int not null primary key auto_increment,
+ id2 int default null, key f1 (id2),
+ constraint f1 foreign key (id2) references t1 (id) on delete cascade) engine=innodb;
+error ER_ROW_IS_REFERENCED_2;
+drop table t1,t2;
+sync_slave_with_master;
+show tables;
+connection master;
+drop table t1;
+sync_slave_with_master;
--source include/rpl_end.inc