blob: bc61cfb4d6f5c99cdae0dbed2b7a1bf07392eb59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
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;
SET GLOBAL wsrep_slave_threads = 2;
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(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE LIKE 'Commit' or STATE = 'Waiting for certification');
EXPECT_1
1
SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
EXPECT_1
1
SELECT COUNT(*) AS EXPECT_0 FROM t1;
EXPECT_0
0
SELECT COUNT(*) AS EXPECT_0 FROM t2;
EXPECT_0
0
connection node_2;
UNLOCK TABLES;
connection node_2a;
SET SESSION wsrep_sync_wait = 15;;
SELECT COUNT(*) AS EXPECT_1 FROM t1;
EXPECT_1
1
SELECT COUNT(*) AS EXPECT_1 FROM t2;
EXPECT_1
1
SELECT COUNT(*) AS EXPECT_2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE LIKE '%committed%' or STATE = 'Waiting for certification');
EXPECT_2
2
SET GLOBAL wsrep_slave_threads = 1;;
DROP TABLE t1;
DROP TABLE t2;
|