mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-25530 Error 1451 on slave: Cannot delete or update a parent row: a foreign key constraint fails
after dfb41fddf6
tables that failed to drop are excluded from the
binlogged DROP TABLE statement. It means that the slave should not
expect any errors when executing DROP TABLE, and the binlog should
report that no error has happened, even if it was.
Do not write error code into the binlogged DROP TABLE,
and remove all code that was needed to compute it.
This commit is contained in:
@@ -55,4 +55,21 @@ count(*)
|
||||
0
|
||||
connection master;
|
||||
drop table t2,t1;
|
||||
set foreign_key_checks=1;
|
||||
#
|
||||
# MDEV-25530 Error 1451 on slave: Cannot delete or update a parent row: a foreign key constraint fails
|
||||
#
|
||||
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;
|
||||
drop table t1,t2;
|
||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
|
||||
connection slave;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
connection master;
|
||||
drop table t1;
|
||||
connection slave;
|
||||
include/rpl_end.inc
|
||||
|
Reference in New Issue
Block a user