Debian Codegraph @

mysql-test/suite/group_replication/r/gr_recovery_slave_commands.result

raw
1 include/group_replication.inc
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
7 # Bootstrap start GR on M1 and test commands for recovery channel
8 # when MEMBER_STATE: ONLINE and recovery channel is ABSENT
9 [connection server1]
10 set session sql_log_bin=0;
11 call mtr.add_suppression("Replica channel 'group_replication_recovery' does not exist.*");
12 set session sql_log_bin=1;
13 include/start_and_bootstrap_group_replication.inc
14
15 # CHM for 'group_replication_recovery' channel won't accept parameters other than
16 # MASTER_USER and MASTER_PASSWORD
17 CHANGE REPLICATION SOURCE TO SOURCE_HOST="localhost", SOURCE_PORT=10 FOR CHANNEL "group_replication_recovery";
18 ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_recovery'.
19 CHANGE REPLICATION SOURCE TO SOURCE_TLS_CIPHERSUITES="foo" FOR CHANNEL "group_replication_recovery";
20 ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_recovery'.
21 CHANGE REPLICATION SOURCE TO SOURCE_CONNECTION_AUTO_FAILOVER=1 FOR CHANNEL "group_replication_recovery";
22 ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_recovery'.
23
24 # ERROR when executing STOP SLAVE on GR recovery channel
25 STOP SLAVE FOR CHANNEL 'group_replication_recovery';
26 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
27
28 # ERROR when executing START SLAVE on GR recovery channel
29 START SLAVE FOR CHANNEL 'group_replication_recovery';
30 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
31
32 # ERROR when executing STOP SLAVE IO_THREAD on GR recovery channel
33 STOP SLAVE IO_THREAD FOR CHANNEL 'group_replication_recovery';
34 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
35
36 # ERROR when executing START SLAVE IO_THREAD on GR recovery channel
37 START SLAVE IO_THREAD FOR CHANNEL 'group_replication_recovery';
38 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
39
40 # ERROR when executing STOP SLAVE SQL_THREAD on GR recovery channel
41 STOP SLAVE SQL_THREAD FOR CHANNEL 'group_replication_recovery';
42 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
43
44 # ERROR when executing START SLAVE SQL_THREAD on GR recovery channel
45 START SLAVE SQL_THREAD FOR CHANNEL 'group_replication_recovery';
46 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
47
48 # ERROR when executing SHOW SLAVE STATUS on GR recovery channel
49 SHOW SLAVE STATUS FOR CHANNEL 'group_replication_recovery';
50 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
51
52 # ERROR when executing SHOW RELAYLOG EVENTS on GR recovery channel
53 SHOW RELAYLOG EVENTS FOR CHANNEL 'group_replication_recovery';
54 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
55
56 # ERROR when executing FLUSH RELAY LOGS on GR recovery channel
57 FLUSH RELAY LOGS FOR CHANNEL 'group_replication_recovery';
58 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
59
60 # ERROR when executing RESET SLAVE command on GR recovery channel
61 RESET SLAVE FOR CHANNEL "group_replication_recovery";
62 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
63
64 # ERROR when executing RESET SLAVE ALL command on GR recovery channel
65 RESET SLAVE ALL FOR CHANNEL "group_replication_recovery";
66 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
67
68 # Add some data for recovery on M1. Start GR on M2.
69 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
70 INSERT INTO t1 VALUES (1);
71 [connection server2]
72 set session sql_log_bin=0;
73 call mtr.add_suppression("Transaction cannot be executed while Group Replication is recovering.*");
74 call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed");
75 set session sql_log_bin=1;
76 CHANGE REPLICATION SOURCE TO SOURCE_USER="root" FOR CHANNEL "group_replication_recovery";
77 include/start_group_replication.inc
78
79 # Test commands for recovery channel when MEMBER_STATE: ONLINE and
80 # recovery channel is PRESENT but INACTIVE.
81
82 # STOP SLAVE is blocked on GR recovery channel
83 STOP SLAVE FOR CHANNEL "group_replication_recovery";
84 ERROR HY000: STOP REPLICA FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
85
86 # START SLAVE is blocked on GR recovery channel
87 START SLAVE FOR CHANNEL 'group_replication_recovery';
88 ERROR HY000: START REPLICA FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
89
90 # STOP SLAVE IO_THREAD is blocked on GR recovery channel
91 STOP SLAVE IO_THREAD FOR CHANNEL 'group_replication_recovery';
92 ERROR HY000: STOP REPLICA IO_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
93
94 # START SLAVE IO_THREAD is blocked on GR recovery channel
95 START SLAVE IO_THREAD FOR CHANNEL 'group_replication_recovery';
96 ERROR HY000: START REPLICA IO_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
97
98 # STOP SLAVE SQL_THREAD is blocked on GR recovery channel
99 STOP SLAVE SQL_THREAD FOR CHANNEL 'group_replication_recovery';
100 ERROR HY000: STOP REPLICA SQL_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
101
102 # START SLAVE SQL_THREAD is blocked on GR recovery channel
103 START SLAVE SQL_THREAD FOR CHANNEL 'group_replication_recovery';
104 ERROR HY000: START REPLICA SQL_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
105
106 # SHOW SLAVE STATUS - check that recovery channel is inactive
107 include/assert.inc [recovery channel is inactive]
108
109 # SHOW RELAYLOG EVENTS - check that relaylogs are created
110 include/assert.inc [Relay logs are created]
111
112 # SUCCESS when executing FLUSH RELAY LOGS on GR recovery channel
113 FLUSH RELAY LOGS FOR CHANNEL 'group_replication_recovery';
114
115 # SUCCESS when executing RESET SLAVE on GR recovery channel
116 RESET SLAVE FOR CHANNEL "group_replication_recovery";
117 Warnings:
118 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
119
120 # Execute RESET SLAVE ALL FOR CHANNEL to delete the recovery channel
121 # and related files
122 RESET SLAVE ALL FOR CHANNEL "group_replication_recovery";
123 Warnings:
124 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
125
126 # Stop GR on M2. Add data on M1. Lock table on M2 to block recovery.
127 # Start GR on M2.
128 [connection server2]
129 include/stop_group_replication.inc
130 [connection server1]
131 INSERT INTO t1 VALUES (2);
132 INSERT INTO t1 VALUES (3);
133 [connection server_2]
134 LOCK TABLE t1 READ;
135 [connection server2]
136 CHANGE REPLICATION SOURCE TO SOURCE_USER="root" FOR CHANNEL "group_replication_recovery";
137
138 # Ensure that M2 is blocked in recovery stage so channel exists
139 include/start_group_replication.inc
140
141 # Now when M2 is in RECOVERING state, test commands for recovery channel
142 # when MEMBER_STATE: RECOVERING and recovery channel is ACTIVE.
143
144 # STOP SLAVE is blocked on GR recovery channel
145 STOP SLAVE FOR CHANNEL "group_replication_recovery";
146 ERROR HY000: STOP REPLICA FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
147
148 # START SLAVE is blocked on GR recovery channel
149 START SLAVE FOR CHANNEL 'group_replication_recovery';
150 ERROR HY000: START REPLICA FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
151
152 # STOP SLAVE IO_THREAD is blocked on GR recovery channel
153 STOP SLAVE IO_THREAD FOR CHANNEL 'group_replication_recovery';
154 ERROR HY000: STOP REPLICA IO_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
155
156 # START SLAVE IO_THREAD is blocked on GR recovery channel
157 START SLAVE IO_THREAD FOR CHANNEL 'group_replication_recovery';
158 ERROR HY000: START REPLICA IO_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
159
160 # START SLAVE IO_THREAD with UNTIL option is blocked on GR recovery channel
161 START SLAVE IO_THREAD UNTIL SOURCE_LOG_FILE = 'server-binary-log.000001', SOURCE_LOG_POS = 754 FOR CHANNEL 'group_replication_recovery';
162 ERROR HY000: START REPLICA IO_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
163
164 # STOP SLAVE SQL_THREAD is blocked on GR recovery channel
165 STOP SLAVE SQL_THREAD FOR CHANNEL 'group_replication_recovery';
166 ERROR HY000: STOP REPLICA SQL_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
167
168 # START SLAVE SQL_THREAD is blocked on GR recovery channel
169 START SLAVE SQL_THREAD FOR CHANNEL 'group_replication_recovery';
170 ERROR HY000: START REPLICA SQL_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
171
172 # START SLAVE SQL_THREAD with UNTIL option is blocked on GR recovery channel
173 START SLAVE SQL_THREAD UNTIL SQL_AFTER_GTIDS='11111111-1111-1111-1111-111111111111:1-23' FOR CHANNEL 'group_replication_recovery';
174 ERROR HY000: START REPLICA SQL_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
175
176 # START SLAVE SQL_THREAD with UNTIL option is blocked on GR recovery channel
177 START SLAVE SQL_THREAD UNTIL RELAY_LOG_FILE = 'server-relay-log-group_replication_recovery.000001', RELAY_LOG_POS = 854 FOR CHANNEL 'group_replication_recovery';
178 ERROR HY000: START REPLICA SQL_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
179
180 # SHOW SLAVE STATUS - check that recovery channel is active
181 include/assert.inc [recovery channel is active]
182
183 # SHOW RELAYLOG EVENTS - Relay log files should exists
184 include/assert.inc [Relay log name should not be empty as the command successfully executed.]
185
186 # ERROR when executing FLUSH RELAY LOGS on GR recovery channel
187 FLUSH RELAY LOGS FOR CHANNEL 'group_replication_recovery';
188 ERROR HY000: Error on observer while running replication hook 'before_commit'.
189
190 # RESET SLAVE command is blocked only when recovery channel is active.
191 RESET SLAVE FOR CHANNEL "group_replication_recovery";
192 ERROR HY000: This operation cannot be performed with running replication threads; run STOP REPLICA FOR CHANNEL 'group_replication_recovery' first
193
194 # RESET SLAVE [ALL] command is blocked only when recovery channel is active.
195 RESET SLAVE ALL FOR CHANNEL "group_replication_recovery";
196 ERROR HY000: This operation cannot be performed with running replication threads; run STOP REPLICA FOR CHANNEL 'group_replication_recovery' first
197
198 # Unlock tables on M2 and drop table t1 on M1. Stop GR on M2. Test
199 # for recovery channel when MEMBER_STATE: OFFLINE and recovery channel
200 # is PRESENT but INACTIVE.
201 [connection server_2]
202 UNLOCK TABLES;
203 [connection server1]
204 DROP TABLE t1;
205 include/rpl_sync.inc
206 [connection server2]
207 include/stop_group_replication.inc
208
209 # STOP SLAVE is blocked on GR recovery channel
210 STOP SLAVE FOR CHANNEL "group_replication_recovery";
211 ERROR HY000: STOP REPLICA FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
212
213 # START SLAVE is blocked on GR recovery channel
214 START SLAVE FOR CHANNEL 'group_replication_recovery';
215 ERROR HY000: START REPLICA FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
216
217 # STOP SLAVE IO_THREAD is blocked on GR recovery channel
218 STOP SLAVE IO_THREAD FOR CHANNEL 'group_replication_recovery';
219 ERROR HY000: STOP REPLICA IO_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
220
221 # START SLAVE IO_THREAD is blocked on GR recovery channel
222 START SLAVE IO_THREAD FOR CHANNEL 'group_replication_recovery';
223 ERROR HY000: START REPLICA IO_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
224
225 # STOP SLAVE SQL_THREAD is blocked on GR recovery channel
226 STOP SLAVE SQL_THREAD FOR CHANNEL 'group_replication_recovery';
227 ERROR HY000: STOP REPLICA SQL_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
228
229 # START SLAVE SQL_THREAD is blocked on GR recovery channel
230 START SLAVE SQL_THREAD FOR CHANNEL 'group_replication_recovery';
231 ERROR HY000: START REPLICA SQL_THREAD FOR CHANNEL cannot be performed on channel 'group_replication_recovery'.
232
233 # SHOW SLAVE STATUS - check that recovery channel is inactive
234 include/assert.inc [recovery channel is inactive]
235
236 # SHOW RELAYLOG EVENTS - check that relaylogs are not deleted
237 include/assert.inc [Relay logs are not deleted]
238
239 # Execute RESET SLAVE ALL FOR CHANNEL to delete the recovery channel
240 # and related files
241 RESET SLAVE ALL FOR CHANNEL "group_replication_recovery";
242 Warnings:
243 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
244
245 # ERROR when executing RESET SLAVE on GR recovery channel
246 RESET SLAVE FOR CHANNEL "group_replication_recovery";
247 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
248
249 # ERROR when executing FLUSH RELAY LOGS on GR recovery channel
250 FLUSH RELAY LOGS FOR CHANNEL 'group_replication_recovery';
251 ERROR HY000: Replica channel 'group_replication_recovery' does not exist.
252 include/group_replication_end.inc