mariadb/mysql-test/suite/galera/r/mysql-wsrep-bugs-607.result
sjaakola 33de71c2f8 MDEV-22632 wsrep XID checkpointing can happen out of order for certification failure
When a transaction fails in certification phase, it has connsumed one GTID, but as
transaction must rollback, it will not go for commit ordering, and because of this
also the wsrep XID checkpointing can happen out of order.
This PR will make the thread, which has failed for certiication failure to wait for its
commit order turn for checkpointing wsrep IXD in innodb rollback segment.

There is a specific test for wsrep XID checkpointing ordering in mtr test:
mysql-wsrep-bugs-607, which is added in this PR.

Test galera_slave_replay depends also on this fix, as the second test phase
may also assert for bad wsrep XID checkpointing order.
galera_slave_replay.test had also other problems, which caused the test to
fail immediately, thse are now fixes in this PR as well.
2020-06-24 17:16:38 +03:00

31 lines
921 B
Text

connection node_2;
connection node_1;
#
# test the order of wsrep XID storage after certifiation failure
#
connection node_1;
set session wsrep_sync_wait=0;
create table t1 (i int primary key, j int);
insert into t1 values (4, 0);
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2b;
set session wsrep_sync_wait=0;
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
connection node_1;
UPDATE test.t1 set j=1 where i=4;
connection node_2b;
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_2;
set session wsrep_sync_wait=0;
set session wsrep_retry_autocommit=0;
UPDATE test.t1 SET j=2 WHERE i=4;
connection node_2b;
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "RESET";
connection node_2;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
select * from t1;
i j
4 1
DROP TABLE t1;