mariadb/mysql-test/suite/galera/r/galera_lock_table.result
Brave Galera Crew 36a2a185fe Galera4
2019-01-23 15:30:00 +04:00

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;