Debian Codegraph @

mysql-test/suite/x/r/notices_gr_single_primary.result

raw
1 include/group_replication.inc [rpl_server_count=3]
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection server1]
6 [Setup XPlugin user on connection 'server1']
7 [Setup XPlugin user on connection 'server2']
8 [Setup XPlugin user on connection 'server3']
9
10 ## Protocol GR notices enabled - verify delivery of the notices
11 ##########################################################################
12
13 ###
14 ### Sets up the group with two servers: server1 and server2
15 ###
16 connecting...
17 active session is now 'verify_1'
18 connecting...
19 active session is now 'verify_2'
20 connecting...
21 active session is now 'verify_3'
22 [connection verify_1]
23 [Enabling GR notifications]
24 [connection verify_2]
25 [Enabling GR notifications]
26 [connection verify_3]
27 [Enabling GR notifications]
28 connecting...
29 active session is now 'server_1'
30 connecting...
31 active session is now 'server_2'
32 connecting...
33 active session is now 'server_3'
34 [connection server_1]
35 RUN SET GLOBAL group_replication_enforce_update_everywhere_checks= OFF
36 RUN SET GLOBAL group_replication_single_primary_mode= ON
37 RUN SET GLOBAL group_replication_force_members=''
38 [connection server_2]
39 RUN SET GLOBAL group_replication_enforce_update_everywhere_checks= OFF
40 RUN SET GLOBAL group_replication_single_primary_mode= ON
41 RUN SET GLOBAL group_replication_force_members=''
42 [connection server_3]
43 RUN SET GLOBAL group_replication_enforce_update_everywhere_checks= OFF
44 RUN SET GLOBAL group_replication_single_primary_mode= ON
45 RUN SET GLOBAL group_replication_force_members=''
46 [connection server_3]
47 RUN SET GLOBAL group_replication_bootstrap_group= 0
48 [connection server_2]
49 RUN SET GLOBAL group_replication_bootstrap_group= 0
50 [connection server_1]
51 RUN SET GLOBAL group_replication_bootstrap_group= 0
52
53 ### Scenario 1: SERVER BOOTSTRAPS+RECOVERS+PRIMARY ELECTION
54 ### Expected:
55 ### - Myself: 1 VIEW CHANGE, 2 STATE CHANGED, 1 ROLE CHANGED
56 ### - Others: N/A
57 ##########################################################################
58 [connection server_1]
59 RUN SET GLOBAL group_replication_bootstrap_group= 1
60 RUN SET GLOBAL group_replication_group_name='%GR_NAME%'
61 RUN START GROUP_REPLICATION
62 [waiting for member_state to be equal 'ONLINE']
63 [connection server_3]
64 RUN SET GLOBAL group_replication_bootstrap_group= 0
65 [connection server_2]
66 RUN SET GLOBAL group_replication_bootstrap_group= 0
67 [connection server_1]
68 RUN SET GLOBAL group_replication_bootstrap_group= 0
69 [connection server_3]
70 RUN SET GLOBAL group_replication_bootstrap_group= 0
71 [connection server_2]
72 RUN SET GLOBAL group_replication_bootstrap_group= 0
73 [connection server_1]
74 RUN SET GLOBAL group_replication_bootstrap_group= 0
75 [ASSERT view_change on 'verify_1' connection]
76 [ASSERT state_change on 'verify_1' connection]
77 [ASSERT state_change on 'verify_1' connection]
78 [ASSERT role_change on 'verify_1' connection]
79 [ASSERT no notices on 'verify_1' connection]
80 [ASSERT no notices on 'verify_2' connection]
81 [ASSERT no notices on 'verify_3' connection]
82
83 ### Scenario 2: PRIMARY LEAVES the GROUP
84 ### Expected:
85 ### - Myself (old primary): 1 VIEW CHANGED, 1 STATE CHANGED, 1 ROLE CHANGED
86 ### - Others (new primary): 1 VIEW CHANGED, 1 ROLE CHANGED
87 ### - Others (secondary): 1 VIEW CHANGED, 1 ROLE CHANGED
88 ##########################################################################
89 [connection server_2]
90 RUN SET GLOBAL group_replication_group_name='%GR_NAME%'
91 RUN START GROUP_REPLICATION
92 [waiting for member_state to be equal 'ONLINE']
93 [ASSERT view_change on 'verify_1' connection]
94 [ASSERT state_change on 'verify_1' connection]
95 [ASSERT state_change on 'verify_1' connection]
96 [ASSERT no notices on 'verify_1' connection]
97 [ASSERT view_change on 'verify_2' connection]
98 [ASSERT state_change on 'verify_2' connection]
99 [ASSERT state_change on 'verify_2' connection]
100 [ASSERT no notices on 'verify_2' connection]
101 [ASSERT no notices on 'verify_3' connection]
102 [connection server_3]
103 RUN SET GLOBAL group_replication_group_name='%GR_NAME%'
104 RUN START GROUP_REPLICATION
105 [waiting for member_state to be equal 'ONLINE']
106 [ASSERT view_change on 'verify_1' connection]
107 [ASSERT state_change on 'verify_1' connection]
108 [ASSERT state_change on 'verify_1' connection]
109 [ASSERT no notices on 'verify_1' connection]
110 [ASSERT view_change on 'verify_2' connection]
111 [ASSERT state_change on 'verify_2' connection]
112 [ASSERT state_change on 'verify_2' connection]
113 [ASSERT no notices on 'verify_2' connection]
114 [ASSERT view_change on 'verify_3' connection]
115 [ASSERT state_change on 'verify_3' connection]
116 [ASSERT state_change on 'verify_3' connection]
117 [ASSERT no notices on 'verify_3' connection]
118 [connection server_1]
119 RUN STOP GROUP_REPLICATION
120 RUN SET GLOBAL read_only= FALSE
121 [ASSERT view_change on 'verify_1' connection]
122 [ASSERT state_change on 'verify_1' connection]
123 [ASSERT role_change on 'verify_1' connection]
124 [ASSERT no notices on 'verify_1' connection]
125 [connection server_2]
126 [waiting for '2' members]
127 [ASSERT view_change on 'verify_2' connection]
128 [ASSERT role_change on 'verify_2' connection]
129 [ASSERT no notices on 'verify_2' connection]
130 [connection server_3]
131 [waiting for '2' members]
132 [ASSERT view_change on 'verify_3' connection]
133 [ASSERT role_change on 'verify_3' connection]
134 [ASSERT no notices on 'verify_3' connection]
135
136 ###
137 ### In X test cleanup
138 ###
139 [connection server_2]
140 RUN STOP GROUP_REPLICATION
141 RUN SET GLOBAL read_only= FALSE
142 [connection server_3]
143 RUN STOP GROUP_REPLICATION
144 RUN SET GLOBAL read_only= FALSE
145 closing session server_3
146 Mysqlx.Ok {
147 msg: "bye!"
148 }
149 ok
150
151 ## X Protocol GR notices disabled - verify that X Plugin doesn't send the notices
152 ##########################################################################
153
154 ###
155 ### Sets up the group with two servers: server1 and server2
156 ###
157 connecting...
158 active session is now 'verify_1'
159 connecting...
160 active session is now 'verify_2'
161 connecting...
162 active session is now 'verify_3'
163 connecting...
164 active session is now 'server_1'
165 connecting...
166 active session is now 'server_2'
167 connecting...
168 active session is now 'server_3'
169 [connection server_1]
170 RUN SET GLOBAL group_replication_enforce_update_everywhere_checks= OFF
171 RUN SET GLOBAL group_replication_single_primary_mode= ON
172 RUN SET GLOBAL group_replication_force_members=''
173 [connection server_2]
174 RUN SET GLOBAL group_replication_enforce_update_everywhere_checks= OFF
175 RUN SET GLOBAL group_replication_single_primary_mode= ON
176 RUN SET GLOBAL group_replication_force_members=''
177 [connection server_3]
178 RUN SET GLOBAL group_replication_enforce_update_everywhere_checks= OFF
179 RUN SET GLOBAL group_replication_single_primary_mode= ON
180 RUN SET GLOBAL group_replication_force_members=''
181 [connection server_3]
182 RUN SET GLOBAL group_replication_bootstrap_group= 0
183 [connection server_2]
184 RUN SET GLOBAL group_replication_bootstrap_group= 0
185 [connection server_1]
186 RUN SET GLOBAL group_replication_bootstrap_group= 0
187
188 ### Scenario 1: SERVER BOOTSTRAPS+RECOVERS+PRIMARY ELECTION
189 ### Expected:
190 ### - Myself: 1 VIEW CHANGE, 2 STATE CHANGED, 1 ROLE CHANGED
191 ### - Others: N/A
192 ##########################################################################
193 [connection server_1]
194 RUN SET GLOBAL group_replication_bootstrap_group= 1
195 RUN SET GLOBAL group_replication_group_name='%GR_NAME%'
196 RUN START GROUP_REPLICATION
197 [waiting for member_state to be equal 'ONLINE']
198 [connection server_3]
199 RUN SET GLOBAL group_replication_bootstrap_group= 0
200 [connection server_2]
201 RUN SET GLOBAL group_replication_bootstrap_group= 0
202 [connection server_1]
203 RUN SET GLOBAL group_replication_bootstrap_group= 0
204 [connection server_3]
205 RUN SET GLOBAL group_replication_bootstrap_group= 0
206 [connection server_2]
207 RUN SET GLOBAL group_replication_bootstrap_group= 0
208 [connection server_1]
209 RUN SET GLOBAL group_replication_bootstrap_group= 0
210 [ASSERT no notices on 'verify_1' connection]
211 [ASSERT no notices on 'verify_1' connection]
212 [ASSERT no notices on 'verify_1' connection]
213 [ASSERT no notices on 'verify_1' connection]
214 [ASSERT no notices on 'verify_1' connection]
215 [ASSERT no notices on 'verify_2' connection]
216 [ASSERT no notices on 'verify_3' connection]
217
218 ### Scenario 2: PRIMARY LEAVES the GROUP
219 ### Expected:
220 ### - Myself (old primary): 1 VIEW CHANGED, 1 STATE CHANGED, 1 ROLE CHANGED
221 ### - Others (new primary): 1 VIEW CHANGED, 1 ROLE CHANGED
222 ### - Others (secondary): 1 VIEW CHANGED, 1 ROLE CHANGED
223 ##########################################################################
224 [connection server_2]
225 RUN SET GLOBAL group_replication_group_name='%GR_NAME%'
226 RUN START GROUP_REPLICATION
227 [waiting for member_state to be equal 'ONLINE']
228 [ASSERT no notices on 'verify_1' connection]
229 [ASSERT no notices on 'verify_1' connection]
230 [ASSERT no notices on 'verify_1' connection]
231 [ASSERT no notices on 'verify_1' connection]
232 [ASSERT no notices on 'verify_2' connection]
233 [ASSERT no notices on 'verify_2' connection]
234 [ASSERT no notices on 'verify_2' connection]
235 [ASSERT no notices on 'verify_2' connection]
236 [ASSERT no notices on 'verify_3' connection]
237 [connection server_3]
238 RUN SET GLOBAL group_replication_group_name='%GR_NAME%'
239 RUN START GROUP_REPLICATION
240 [waiting for member_state to be equal 'ONLINE']
241 [ASSERT no notices on 'verify_1' connection]
242 [ASSERT no notices on 'verify_1' connection]
243 [ASSERT no notices on 'verify_1' connection]
244 [ASSERT no notices on 'verify_1' connection]
245 [ASSERT no notices on 'verify_2' connection]
246 [ASSERT no notices on 'verify_2' connection]
247 [ASSERT no notices on 'verify_2' connection]
248 [ASSERT no notices on 'verify_2' connection]
249 [ASSERT no notices on 'verify_3' connection]
250 [ASSERT no notices on 'verify_3' connection]
251 [ASSERT no notices on 'verify_3' connection]
252 [ASSERT no notices on 'verify_3' connection]
253 [connection server_1]
254 RUN STOP GROUP_REPLICATION
255 RUN SET GLOBAL read_only= FALSE
256 [ASSERT no notices on 'verify_1' connection]
257 [ASSERT no notices on 'verify_1' connection]
258 [ASSERT no notices on 'verify_1' connection]
259 [ASSERT no notices on 'verify_1' connection]
260 [connection server_2]
261 [waiting for '2' members]
262 [ASSERT no notices on 'verify_2' connection]
263 [ASSERT no notices on 'verify_2' connection]
264 [ASSERT no notices on 'verify_2' connection]
265 [connection server_3]
266 [waiting for '2' members]
267 [ASSERT no notices on 'verify_3' connection]
268 [ASSERT no notices on 'verify_3' connection]
269 [ASSERT no notices on 'verify_3' connection]
270
271 ###
272 ### In X test cleanup
273 ###
274 [connection server_2]
275 RUN STOP GROUP_REPLICATION
276 RUN SET GLOBAL read_only= FALSE
277 [connection server_3]
278 RUN STOP GROUP_REPLICATION
279 RUN SET GLOBAL read_only= FALSE
280 closing session server_3
281 Mysqlx.Ok {
282 msg: "bye!"
283 }
284 ok
285 include/group_replication_end.inc