mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
38 lines
1 KiB
Text
38 lines
1 KiB
Text
connection node_1;
|
|
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
|
connection node_2;
|
|
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
|
connection node_1;
|
|
INSERT INTO t1 VALUES (1);
|
|
connection node_2;
|
|
SET SESSION wsrep_sync_wait = 0;
|
|
SET SESSION wsrep_on = 0;
|
|
SET SESSION wsrep_on = 1;
|
|
SELECT COUNT(*) = 0 FROM t1;
|
|
COUNT(*) = 0
|
|
1
|
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
connection node_2a;
|
|
FLUSH TABLES WITH READ LOCK;;
|
|
connection node_2;
|
|
SET GLOBAL wsrep_provider_options = 'dbug=';
|
|
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
|
connection node_2a;
|
|
connection node_2;
|
|
SET SESSION lock_wait_timeout = 1;
|
|
SET SESSION innodb_lock_wait_timeout=1;
|
|
SET SESSION wait_timeout=1;
|
|
INSERT INTO t2 VALUES (2);
|
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
|
connection node_2a;
|
|
UNLOCK TABLES;
|
|
connection node_2;
|
|
SELECT COUNT(*) = 1 FROM t1;
|
|
COUNT(*) = 1
|
|
1
|
|
INSERT INTO t1 VALUES (3);
|
|
connection node_1;
|
|
SELECT COUNT(*) = 2 FROM t1;
|
|
COUNT(*) = 2
|
|
1
|
|
DROP TABLE t1;
|