connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT);
INSERT INTO t1 VALUES (1, 0), (5, 0);
connection node_1_ctrl; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_slave_threads = 2;
connection node_1; SET SESSION wsrep_retry_autocommit = 0;
START TRANSACTION;
UPDATE t1 SET f2 = 1;
connection node_1_ctrl; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
INSERT INTO t1 VALUES (2, 2);
connection node_1_ctrl; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'dbug='; SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_slave_enter_sync';
connection node_2;
UPDATE t1 SET f2 = 2 WHERE f1 = 5;
connection node_1_ctrl; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'dbug='; SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
connection node_1; SET SESSION debug_sync = "wsrep_before_replay SIGNAL reached WAIT_FOR continue";
COMMIT;
connection node_1_ctrl; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync'; SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; SET SESSION debug_sync = "now WAIT_FOR reached"; SET GLOBAL wsrep_provider_options = 'signal=local_monitor_slave_enter_sync'; SET GLOBAL wsrep_provider_options = 'dbug='; SET SESSION debug_sync = "now SIGNAL continue";
connection node_1; ERROR40001: Deadlock found when trying to get lock; try restarting transaction SET debug_sync = "RESET";
DROP TABLE t1; SET GLOBAL wsrep_slave_threads = DEFAULT;
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.