summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera_sr/t/GCF-1008.inc
blob: 69245b3a91f2dd17f359b9bf7bd9b41305940d7a (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
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;

--connection node_2
SET SESSION wsrep_trx_fragment_size = 1;
START TRANSACTION;
INSERT INTO t1 VALUES (1, 'x');

--connection node_2a
--source include/galera_set_sync_point.inc

--connection node_2
--send COMMIT

--connection node_2b
--sleep 1
SET SESSION wsrep_sync_wait = 0;
SELECT COUNT(*) = 0 FROM t1;

--connection node_1
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_trx_fragment_size = 1;
SELECT COUNT(*) = 1 FROM t1;
REPLACE INTO t1 VALUES (1,'y');

--connection node_2b
SELECT COUNT(*) = 0 FROM t1;

--connection node_2a
--source include/galera_signal_sync_point.inc
--source include/galera_clear_sync_point.inc

--connection node_2
--reap
SELECT COUNT(*) = 1 FROM t1;

DROP TABLE t1;