mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#16228/Bug#20697 - related.
Bug#23831 deadlock not noticed RBR bug in that when replicated msta (multi-statement-trans-action) deadlocks with a local at write row event or gets timed-out, the event handler did not return the correct error code. Wrong error code stops slave sql thread instead of to proceed with rollback and replay. The correct code is typed in error log and stored for error handling rotine to conduct rollback and replay of the transaction. The handling for the rbr remains the same as for the sbr events. Particularly, timed-out transaction still is rolled back - look at the related bugs.
This commit is contained in:

parent
3a3d673dd5
commit
8823b832bb
@ -28,21 +28,22 @@ Variable_name Value
|
||||
slave_transaction_retries 2
|
||||
stop slave;
|
||||
begin;
|
||||
insert into t3 select * from t2 for update;
|
||||
insert into t2 values (0);
|
||||
insert into t1 values(1);
|
||||
commit;
|
||||
begin;
|
||||
select * from t1 for update;
|
||||
a
|
||||
start slave;
|
||||
insert into t2 values(201);
|
||||
select * from t2 for update /* dl */;
|
||||
a
|
||||
commit;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
select * from t2;
|
||||
select * from t2 /* must be 1 */;
|
||||
a
|
||||
201
|
||||
0
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
@ -83,7 +84,7 @@ change master to master_log_pos=544;
|
||||
begin;
|
||||
select * from t2 for update;
|
||||
a
|
||||
201
|
||||
0
|
||||
start slave;
|
||||
select count(*) from t3 /* must be zero */;
|
||||
count(*)
|
||||
@ -95,7 +96,8 @@ a
|
||||
1
|
||||
select * from t2;
|
||||
a
|
||||
201
|
||||
0
|
||||
0
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
@ -137,7 +139,8 @@ change master to master_log_pos=544;
|
||||
begin;
|
||||
select * from t2 for update;
|
||||
a
|
||||
201
|
||||
0
|
||||
0
|
||||
start slave;
|
||||
select count(*) from t3 /* must be zero */;
|
||||
count(*)
|
||||
@ -150,7 +153,9 @@ a
|
||||
1
|
||||
select * from t2;
|
||||
a
|
||||
201
|
||||
0
|
||||
0
|
||||
0
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
|
Reference in New Issue
Block a user