summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result
blob: cdf330643c230c10f76854227ecfec37e04b1127 (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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
#Connection 2
connection node_2;
START SLAVE;
#Connection 1
connection node_1;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 int unique) ENGINE=InnoDB;
INSERT INTO t2 VALUES(1,11);
INSERT INTO t2 VALUES(2,22);
INSERT INTO t2 VALUES(3,33);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
1-1-4
include/save_master_gtid.inc
#Connection 2
connection node_2;
include/sync_with_master_gtid.inc
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
1-1-4
INSERT INTO t2 VALUES(4,44);
INSERT INTO t2 VALUES(5,55);
INSERT INTO t2 VALUES(6,66);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
1-1-4,2-2-3
#Connection 3
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
INSERT INTO t2 VALUES(7,77);
INSERT INTO t2 VALUES(8,88);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
1-1-4,2-2-3,2-3-5
#Connection 1
connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
COMMIT;
include/save_master_gtid.inc
#Connection 2
connection node_2;
include/sync_with_master_gtid.inc
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
#Connection 3
connection node_3;
connection node_2;
connection node_3;
Shutting down server ...
#Connection 2
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
INSERT INTO t1 VALUES ('node1_committed_during');
COMMIT;
#Connection 3
connection node_3;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node3_committed_after');
INSERT INTO t1 VALUES ('node3_committed_after');
COMMIT;
#Connection 2
connection node_2;
Select * from t1 order by f1;
f1
node1_committed_before
node1_committed_before
node1_committed_during
node1_committed_during
node2_committed_before
node2_committed_before
node3_committed_after
node3_committed_after
#Connection 3
connection node_3;
Select * from t1 order by f1;
f1
node1_committed_before
node1_committed_before
node1_committed_during
node1_committed_during
node2_committed_before
node2_committed_before
node3_committed_after
node3_committed_after
#Connection 2
connection node_2;
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
1-1-6,2-2-7,2-3-8
#Connection 3
connection node_3;
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
1-1-6,2-2-7,2-3-8
#Connection 1
connection node_1;
SET AUTOCOMMIT=ON;
#Connection 2
connection node_2;
SET AUTOCOMMIT=ON;
#Connection 3
connection node_3;
SET AUTOCOMMIT=ON;
#Connection 2
connection node_2;
STOP slave;
INSERT INTO t1 VALUES ('node2_slave_stoped');
#Connection 1
connection node_1;
INSERT INTO t1 VALUES ('node1_normal_entry');
include/save_master_gtid.inc
#Connection 2
connection node_2;
INSERT INTO t1 VALUES ('node2_slave_stoped_inserted');
start slave;
include/sync_with_master_gtid.inc
INSERT INTO t1 VALUES ('node2_slave_started');
SELECT count(*) from t1;
count(*)
12
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
1-1-7,2-3-8,2-2-11
#Connection 3
connection node_3;
SELECT count(*) from t1;
count(*)
12
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
1-1-7,2-3-8,2-2-11
#Connection 1
connection node_1;
DROP TABLE t2,t1;
#Connection 2
connection node_2;
#Connection 3
connection node_3;
#Connection 2
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
reset master;
#Connection 3
connection node_3;
reset master;
#Connection 1
connection node_1;
reset master;