1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug#31552 Replication breaks when deleting rows from out-of-sync table

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.
This commit is contained in:
aelkin/elkin@koti.dsl.inet.fi
2007-12-12 12:14:59 +02:00
parent cf56c586b7
commit d8d6db6f78
32 changed files with 1007 additions and 99 deletions

View File

@ -301,6 +301,7 @@ SELECT COUNT(*) FROM history;
COUNT(*)
400
*** DUMP MASTER & SLAVE FOR COMPARE ********
set @@global.slave_exec_mode='IDEMPOTENT' /* to ignore missed records in mysql.proc */;
*************** TEST 2 CLEANUP SECTION ********************
DROP PROCEDURE IF EXISTS tpcb.load;
DROP PROCEDURE IF EXISTS tpcb.trans;

View File

@ -370,6 +370,7 @@ C1 C2
1 3
2 6
3 9
set @@global.slave_exec_mode= 'IDEMPOTENT';
--- on master: new values inserted ---
INSERT INTO t7 VALUES (1,2), (2,4), (3,6);
SELECT * FROM t7 ORDER BY C1;
@ -377,6 +378,7 @@ C1 C2
1 2
2 4
3 6
set @@global.slave_exec_mode= 'STRICT';
--- on slave: old values should be overwritten by replicated values ---
SELECT * FROM t7 ORDER BY C1;
C1 C2
@ -406,8 +408,10 @@ a b c
2 4 6
3 6 9
99 99 99
set @@global.slave_exec_mode= 'IDEMPOTENT';
--- on master ---
INSERT INTO t8 VALUES (2,4,8);
set @@global.slave_exec_mode= default;
--- on slave ---
SELECT * FROM t8 ORDER BY a;
a b c