File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1
1
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
2
2
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
3
3
SET GLOBAL wsrep_slave_threads = 2;
4
+ LOCK TABLE t1 WRITE;
4
5
INSERT INTO t1 VALUES (1);
5
6
INSERT INTO t2 VALUES (1);
6
7
INSERT INTO t1 VALUES (1);
@@ -13,15 +14,15 @@ INSERT INTO t1 VALUES (1);
13
14
INSERT INTO t2 VALUES (1);
14
15
INSERT INTO t1 VALUES (1);
15
16
INSERT INTO t2 VALUES (1);
17
+ SET SESSION wsrep_sync_wait = 0;
18
+ UNLOCK TABLES;
19
+ SET SESSION wsrep_sync_wait = 7;
16
20
SELECT COUNT(*) = 10 FROM t1;
17
21
COUNT(*) = 10
18
22
0
19
23
SELECT COUNT(*) = 10 FROM t2;
20
24
COUNT(*) = 10
21
25
0
22
- SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
23
- COUNT(*) = 2
24
- 1
25
26
SET GLOBAL wsrep_slave_threads = 1;;
26
27
DROP TABLE t1;
27
28
DROP TABLE t2;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ CREATE TABLE t2 (id INT) ENGINE=InnoDB;
13
13
14
14
--connection node_2
15
15
SET GLOBAL wsrep_slave_threads = 2;
16
+ LOCK TABLE t1 WRITE;
16
17
17
18
--connection node_1
18
19
INSERT INTO t1 VALUES (1);
@@ -34,10 +35,20 @@ INSERT INTO t1 VALUES (1);
34
35
INSERT INTO t2 VALUES (1);
35
36
36
37
--connection node_2
38
+ SET SESSION wsrep_sync_wait = 0;
39
+
40
+ --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%';
41
+ --source include/wait_condition.inc
42
+
43
+ --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'applied write set%';
44
+ --source include/wait_condition.inc
45
+
46
+ UNLOCK TABLES;
47
+
48
+ SET SESSION wsrep_sync_wait = 7;
37
49
38
50
SELECT COUNT(*) = 10 FROM t1;
39
51
SELECT COUNT(*) = 10 FROM t2;
40
- SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
41
52
42
53
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
43
54
You can’t perform that action at this time.
0 commit comments