1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-09 22:24:09 +03:00
Files
mariadb/mysql-test/suite/rpl/t/rpl_temporary_errors.test
mats@kindahl-laptop.dnsalias.net 012bccc09f BUG#24860 (Incorrect SLAVE_TRANSACTION_RETRIES code can result in slave stuck):
If a temporary error occured inside a group on an event that was not the first
event of the group, the slave could get stuck because the retry counter is reset
whenever an event was executed successfully.

This patch only reset the retry counter when an entire group has been successfully
executed, or failed with a non-transient error.
2007-10-20 20:16:12 +02:00

30 lines
774 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';
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;
save_master_pos;
SELECT * FROM t1;
#SHOW BINLOG EVENTS;
--echo **** On Slave ****
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
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;