mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
d8d6db6f78
without PK Bug#31609 Not all RBR slave errors reported as errors bug#32468 delete rows event on a table with foreign key constraint fails The first two bugs comprise idempotency issues. First, there was no error code reported under conditions of the bug description although the slave sql thread halted. Second, executions were different with and without presence of prim key in the table. Third, there was no way to instruct the slave whether to ignore an error and skip to the following event or to halt. Fourth, there are handler errors which might happen due to idempotent applying of binlog but those were not listed among the "idempotent" error list. All the named issues are addressed. Wrt to the 3rd, there is the new global system variable, changeble at run time, which controls the slave sql thread behaviour. The new variable allows further extensions to mimic the sql_mode session/global variable. To address the 4th, the new bug#32468 had to be fixed as it was staying in the way.
32 lines
743 B
Text
32 lines
743 B
Text
stop slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
start slave;
|
|
create table t1(n int auto_increment primary key, s char(10));
|
|
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
|
insert into t1 values (2,'old');
|
|
insert into t1 values(NULL,'new');
|
|
insert into t1 values(NULL,'new');
|
|
select * from t1 order by n;
|
|
n s
|
|
1 new
|
|
2 new
|
|
delete from t1 where n = 2;
|
|
start slave;
|
|
stop slave;
|
|
create table t2(n int);
|
|
drop table t2;
|
|
insert into t1 values(NULL,'new');
|
|
set sql_log_bin=0;
|
|
insert into t1 values(NULL,'new');
|
|
set sql_log_bin=1;
|
|
delete from t1 where n=4;
|
|
start slave;
|
|
select * from t1 order by n;
|
|
n s
|
|
1 new
|
|
3 new
|
|
drop table t1;
|
|
set @@global.slave_exec_mode= default;
|