Open rameshvs02 opened 8 years ago
This should be simpler TC
Ensure that following is set besides default configuration log-slave-updates=true gtid-mode=on enforce-gtid-consistency=true
use test; create table t1 (i int, j int, k int, primary key pk(i)) engine=innodb; insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); create table t2 (i int, j int, k int, primary key pk(i, j, k), index idx(i, k, j)) engine=innodb; replace into t2 (i, j, k) select /!99997/ i, k, j from t1;
REPLACE stmt execute as TOI and newly added check to persist SE checkpoint for TOI based query causes double persistence of same seqno.
REPLACE ... SELECT (or for that matter INSERT ... SELECT) which are DML stmt are being executed in TOI fashion and code try to initiate initial commit for DML that causes seqno-persistence and again TOI causes the same seqno persistence.
So may be apply_wsrep_toi should be ANDed (&&) to consider a special case where-in DML is running as TOI.
Error info
How to reproduce