connection node_2;
connection node_1;
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(*) AS EXPECT_0 FROM t1;
EXPECT_0
0
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 t1 VALUES (2 );
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
connection node_2a;
UNLOCK TABLES;
connection node_2;
SELECT COUNT(*) AS EXPECT_1 FROM t1;
EXPECT_1
1
INSERT INTO t1 VALUES (3 );
connection node_1;
SELECT COUNT(*) AS EXPECT_2 FROM t1;
EXPECT_2
2
DROP TABLE t1;
Messung V0.5 in Prozent C=93 H=93 G=92
¤ Dauer der Verarbeitung: 0.2 Sekunden
¤
*© Formatika GbR, Deutschland