summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result
blob: 88780a2c87fa8df7765f2ae16204ed076a681e99 (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
41
42
43
44
45
46
47
48
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_dirty_reads = 1;
SELECT f1 FROM t1;
f1
1
USE test;
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
LOCK TABLE t1 WRITE;
UNLOCK TABLES;
FLUSH TABLES WITH READ LOCK;
UNLOCK TABLES;
PREPARE stmt_select FROM 'SELECT f1 FROM t1';
EXECUTE stmt_select;
f1
1
PREPARE stmt_update FROM 'UPDATE t1 SET f1 = f1 + f1';
SET GLOBAL wsrep_dirty_reads = 1;
SET GLOBAL wsrep_sync_wait = 0;
SET GLOBAL wsrep_dirty_reads = 0;
SET GLOBAL wsrep_sync_wait = 15;
SET SESSION wsrep_dirty_reads = 1;
INSERT INTO t1 SELECT * FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
DELETE FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
UPDATE t1 SET f1 = f1 + 1;
ERROR 08S01: WSREP has not yet prepared node for application use
DROP TABLE t1;
ERROR 08S01: WSREP has not yet prepared node for application use
EXECUTE stmt_update;
ERROR 08S01: WSREP has not yet prepared node for application use
SET SESSION wsrep_dirty_reads = 0;
SELECT * FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
EXECUTE stmt_select;
ERROR 08S01: WSREP has not yet prepared node for application use
SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.PROCESSLIST;
COUNT(*) > 0
1
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
DROP TABLE t1;