connection node_2;
connection node_1;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
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 GLOBAL gtid_slave_pos = ""; SET DEBUG_SYNC = "RESET";
DROP TABLE t1;
connection node_3;
DROP TABLE t1;
include/kill_binlog_dump_threads.inc
RESET MASTER;
connection node_1;
disconnect node_2a;
disconnect node_3;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.