mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00

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
939 B
Plaintext
32 lines
939 B
Plaintext
source include/master-slave.inc;
|
|
|
|
--echo **** On Master ****
|
|
connection master;
|
|
SET SESSION BINLOG_FORMAT=ROW;
|
|
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
|
|
INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
|
|
--echo **** On Slave ****
|
|
sync_slave_with_master;
|
|
SHOW STATUS LIKE 'Slave_retried_transactions';
|
|
# since bug#31552/31609 idempotency is not default any longer. In order
|
|
# the following UPDATE t1 to pass the mode is switched temprorarily
|
|
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
|
UPDATE t1 SET a = 5, b = 47 WHERE a = 1;
|
|
SELECT * FROM t1;
|
|
--echo **** On Master ****
|
|
connection master;
|
|
UPDATE t1 SET a = 5, b = 5 WHERE a = 1;
|
|
SELECT * FROM t1;
|
|
#SHOW BINLOG EVENTS;
|
|
--echo **** On Slave ****
|
|
sync_slave_with_master;
|
|
set @@global.slave_exec_mode= default;
|
|
SHOW STATUS LIKE 'Slave_retried_transactions';
|
|
SELECT * FROM t1;
|
|
source include/show_slave_status.inc;
|
|
DROP TABLE t1;
|
|
|
|
--echo **** On Master ****
|
|
connection master;
|
|
DROP TABLE t1;
|