mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
31 lines
647 B
Text
31 lines
647 B
Text
connection node_2;
|
|
connection node_1;
|
|
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
|
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
|
connection node_2;
|
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
|
|
NAME
|
|
test/t1
|
|
test/t2
|
|
LOCK TABLE t1 READ;
|
|
connection node_1;
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t2 VALUES (1);
|
|
connection node_2a;
|
|
SET SESSION wsrep_sync_wait=0;
|
|
SELECT COUNT(*) = 0 FROM t1;
|
|
COUNT(*) = 0
|
|
1
|
|
SELECT COUNT(*) = 0 FROM t2;
|
|
COUNT(*) = 0
|
|
1
|
|
connection node_2;
|
|
UNLOCK TABLES;
|
|
SELECT COUNT(*) = 1 FROM t1;
|
|
COUNT(*) = 1
|
|
1
|
|
SELECT COUNT(*) = 1 FROM t2;
|
|
COUNT(*) = 1
|
|
1
|
|
DROP TABLE t1;
|
|
DROP TABLE t2;
|