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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_on = FALSE;
INSERT INTO t1 VALUES (2);
connection node_2;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
connection node_1;
SET GLOBAL wsrep_on = TRUE;
INSERT INTO t1 VALUES (3);
connection node_2;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 2;
COUNT(*) = 0
1
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 3;
COUNT(*) = 1
1
DROP TABLE t1;
connection node_1;
connection node_1;
START TRANSACTION;
SET SESSION wsrep_on=OFF;
ERROR 25000: You are not allowed to execute this command in a transaction
SET GLOBAL wsrep_on=OFF;
ERROR 25000: You are not allowed to execute this command in a transaction
COMMIT;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
START TRANSACTION;
INSERT INTO t1 VALUES (1);
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;;
connection node_1a;
SET GLOBAL wsrep_on = OFF;
connection node_1;
SHOW SESSION VARIABLES LIKE 'wsrep_on';
Variable_name Value
wsrep_on ON
SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
Variable_name Value
wsrep_on OFF
INSERT INTO t1 VALUES (2);
COMMIT;
connection node_2;
SET SESSION wsrep_sync_wait = 15;
SELECT * FROM t1;
f1
1
2
connection node_1a;
SET GLOBAL wsrep_on = ON;
DROP TABLE t1;
connection node_2;
connection node_1;
SET GLOBAL wsrep_on = OFF;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;;
connection node_1b;
SHOW SESSION VARIABLES LIKE 'wsrep_on';
Variable_name Value
wsrep_on OFF
SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
Variable_name Value
wsrep_on OFF
CREATE TABLE t2 (f1 INTEGER);
DROP TABLE t2;
SET GLOBAL wsrep_on = ON;
SHOW SESSION VARIABLES LIKE 'wsrep_on';
Variable_name Value
wsrep_on ON
disconnect node_1b;
connection node_2;
connection node_1;
SET GLOBAL wsrep_on = OFF;
SET SESSION wsrep_on = ON;
ERROR HY000: Can't enable @@session.wsrep_on, while @@global.wsrep_on is disabled
SET GLOBAL wsrep_on = ON;
SET SESSION wsrep_on = ON;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
SET GLOBAL wsrep_on = OFF;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;;
connection node_1b;
SHOW SESSION VARIABLES LIKE 'wsrep_on';
Variable_name Value
wsrep_on OFF
SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
Variable_name Value
wsrep_on OFF
SET GLOBAL wsrep_on = ON;
START TRANSACTION;
INSERT INTO t1 VALUES(1);
COMMIT;
SELECT * FROM t1;
f1
1
connection node_2;
SELECT * FROM t1;
f1
1
DROP TABLE t1;
connection node_1;
connection node_1;
SET SESSION wsrep_on = OFF;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
INSERT INTO t1 VALUES (1);
START TRANSACTION;
INSERT INTO t1 VALUES (2);
COMMIT;
DROP TABLE t1;
connection node_2;
SHOW TABLES;
Tables_in_test
connection node_1;
SET SESSION wsrep_on = ON;
SET GLOBAL wsrep_on = OFF;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
INSERT INTO t1 VALUES (1);
START TRANSACTION;
INSERT INTO t1 VALUES (2);
COMMIT;
connection node_2;
SHOW TABLES;
Tables_in_test
connection node_1;
DROP TABLE t1;
SET GLOBAL wsrep_on = ON;
connection node_2;
|