mirror of
https://github.com/MariaDB/server.git
synced 2025-04-13 02:35:32 +02:00
99 lines
2.3 KiB
Text
99 lines
2.3 KiB
Text
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
connection node_2a;
|
|
connection node_2;
|
|
connection node_1;
|
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
|
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
|
connection node_3;
|
|
RESET MASTER;
|
|
connection node_2a;
|
|
START SLAVE;
|
|
connection node_3;
|
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
|
|
INSERT INTO t1 VALUES (1, 'a');
|
|
INSERT INTO t1 VALUES (3, 'a');
|
|
set binlog_format=STATEMENT;
|
|
SET AUTOCOMMIT=ON;
|
|
START TRANSACTION;
|
|
SELECT * FROM t1 FOR UPDATE;
|
|
f1 f2
|
|
1 a
|
|
3 a
|
|
UPDATE t1 SET f2 = 'c' WHERE f1 > 1;
|
|
connection node_2a;
|
|
SET SESSION wsrep_sync_wait = 0;
|
|
connection node_1;
|
|
SET SESSION wsrep_sync_wait = 0;
|
|
connection node_2a;
|
|
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
|
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
|
|
connection node_1;
|
|
INSERT INTO test.t1 VALUES (2, 'b');
|
|
connection node_3;
|
|
COMMIT;
|
|
connection node_2a;
|
|
SET SESSION wsrep_on = 0;
|
|
SET SESSION wsrep_on = 1;
|
|
SET GLOBAL debug_dbug = "";
|
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
|
connection node_2a;
|
|
SET GLOBAL wsrep_provider_options = 'dbug=';
|
|
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
|
connection node_3;
|
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
|
|
COUNT(*) = 1
|
|
1
|
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
|
|
COUNT(*) = 1
|
|
1
|
|
SELECT * FROM t1;
|
|
f1 f2
|
|
1 a
|
|
3 c
|
|
connection node_2a;
|
|
set session wsrep_sync_wait=15;
|
|
set session wsrep_sync_wait=0;
|
|
wsrep_local_replays
|
|
1
|
|
SELECT * FROM t1;
|
|
f1 f2
|
|
1 a
|
|
2 b
|
|
3 c
|
|
SET DEBUG_SYNC = "RESET";
|
|
#
|
|
# test phase with real abort
|
|
#
|
|
connection node_3;
|
|
set binlog_format=ROW;
|
|
insert into t1 values (4, 'd');
|
|
SET AUTOCOMMIT=ON;
|
|
START TRANSACTION;
|
|
UPDATE t1 SET f2 = 'd' WHERE f1 = 3;
|
|
connection node_2a;
|
|
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
|
|
connection node_1;
|
|
UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
|
|
connection node_2a;
|
|
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
|
connection node_3;
|
|
COMMIT;
|
|
connection node_2a;
|
|
SET GLOBAL debug_dbug = "";
|
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
|
connection node_2a;
|
|
set session wsrep_sync_wait=15;
|
|
SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e';
|
|
COUNT(*) = 1
|
|
1
|
|
set session wsrep_sync_wait=0;
|
|
STOP SLAVE;
|
|
RESET SLAVE;
|
|
SET DEBUG_SYNC = "RESET";
|
|
DROP TABLE t1;
|
|
connection node_3;
|
|
DROP TABLE t1;
|
|
RESET MASTER;
|
|
connection node_1;
|
|
disconnect node_2a;
|
|
disconnect node_3;
|