rpl_temporary_errors.result 965 Bytes
Newer Older
1 2 3 4 5 6
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;
7
call mtr.add_suppression("Deadlock found");
8 9 10 11 12 13 14 15
**** On 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);
**** On Slave ****
SHOW STATUS LIKE 'Slave_retried_transactions';
Variable_name	Value
Slave_retried_transactions	0
16
set @@global.slave_exec_mode= 'IDEMPOTENT';
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
UPDATE t1 SET a = 5, b = 47 WHERE a = 1;
SELECT * FROM t1;
a	b
5	47
2	2
3	3
4	4
**** On Master ****
UPDATE t1 SET a = 5, b = 5 WHERE a = 1;
SELECT * FROM t1;
a	b
5	5
2	2
3	3
4	4
**** On Slave ****
33
set @@global.slave_exec_mode= default;
34 35
SHOW STATUS LIKE 'Slave_retried_transactions';
Variable_name	Value
36
Slave_retried_transactions	0
37 38 39 40 41 42
SELECT * FROM t1;
a	b
5	47
2	2
3	3
4	4
43
Checking that both slave threads are running.
44 45 46
DROP TABLE t1;
**** On Master ****
DROP TABLE t1;