mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Bug#38205 Row-based Replication (RBR) causes inconsistencies: HA_ERR_FOUND_DUP
Bug#319 if while a non-transactional slave is replicating a transaction possible problem It is impossible to roll back a mixed engines transaction when one of the engine is non-transaction. In replication that fact is crucial because the slave can not safely re-apply a transction that was interrupted with STOP SLAVE. Fixed with making STOP SLAVE not be effective immediately in the case the current group of replication events has modified a non-transaction table. In order for slave to leave either the group needs finishing or the user issues KILL QUERY|CONNECTION slave_thread_id.
This commit is contained in:
56
mysql-test/suite/bugs/r/rpl_bug38205.result
Normal file
56
mysql-test/suite/bugs/r/rpl_bug38205.result
Normal file
@@ -0,0 +1,56 @@
|
||||
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;
|
||||
create table t1i(n int primary key) engine=innodb;
|
||||
create table t2m(n int primary key) engine=myisam;
|
||||
begin;
|
||||
insert into t1i values (1);
|
||||
insert into t1i values (2);
|
||||
insert into t1i values (3);
|
||||
commit;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
insert into t2m values (1);
|
||||
update t1i set n = 5 where n = 4;
|
||||
commit;
|
||||
zero
|
||||
0
|
||||
*** kill sql thread ***
|
||||
rollback;
|
||||
*** sql thread is *not* running: No ***
|
||||
*** the prove: the killed slave has not finished the current transaction ***
|
||||
three
|
||||
3
|
||||
one
|
||||
1
|
||||
zero
|
||||
0
|
||||
delete from t2m;
|
||||
start slave sql_thread;
|
||||
delete from t1i;
|
||||
delete from t2m;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
update t1i set n = 5 where n = 4;
|
||||
commit;
|
||||
zero
|
||||
0
|
||||
stop slave sql_thread;
|
||||
rollback;
|
||||
*** sql thread is running: No ***
|
||||
*** the prove: the stopped slave has rolled back the current transaction ***
|
||||
zero
|
||||
0
|
||||
zero
|
||||
0
|
||||
one
|
||||
1
|
||||
start slave sql_thread;
|
||||
drop table t1i, t2m;
|
Reference in New Issue
Block a user