Debian Codegraph @

mysql-test/suite/galera/t/galera_applier_ftwrl_table.test

raw
1 #
2 # Test that applying plays well with FLUSH TABLE table_name WITH READ LOCK. The applier
3 # thread should block until UNLOCK TABLEs.
4 #
5
6 --source include/galera_cluster.inc
7 --source include/have_innodb.inc
8
9 --connection node_1
10 SET SESSION wsrep_sync_wait = 0;
11 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
12
13 FLUSH TABLE t1 WITH READ LOCK;
14
15 --connection node_2
16 INSERT INTO t1 VALUES (1);
17 INSERT INTO t1 VALUES (2);
18
19 --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
20 --connection node_1a
21 SET SESSION wsrep_sync_wait = 0;
22
23 --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE LIKE 'Waiting for table metadata lock%' OR STATE LIKE 'Waiting to execute in isolation%');
24 --source include/wait_condition.inc
25
26 SELECT COUNT(*) = 0 FROM t1;
27
28 --connection node_1
29 UNLOCK TABLES;
30
31 SET SESSION wsrep_sync_wait = 15;
32 SELECT COUNT(*) = 2 FROM t1;
33
34 DROP TABLE t1;