Debian Codegraph @

mysql-test/suite/rpl/r/rpl_multi_source_relay_log.result

raw
1 #########################################################################
2 # Verify that the "ch1" and "ch2" channels would copy the global
3 # replication filters to its own per-channel replication filters
4 # when they are being created and configured by CHANGE MASTER TO
5 # ... FOR CHANNEL.
6 #
7 # Verify RESET SLAVE and RESET SLAVE FOR CHANNEL
8 # - deletes all relay log files of named channels and reinitializes
9 # them.
10 # - For default channel, it restart the relay log from .000001
11 # - retains replication filters of the channel.
12 # - For named channel, it restart the relay log from ch.000001
13 # - retains all replication filters from all replication channels.
14 #
15 # Verify that "'RESET SLAVE ALL FOR CHANNEL '<channel_name>'" removes
16 # the replication channel specified by 'FOR CHANNEL' clause and all
17 # replication filters of the channel. There is no effect to other
18 # channels.
19 #
20 # "RESET SLAVE ALL FOR CHANNEL ''" removes the default channel and all
21 # replication filters of the channel firstly, but then create a new
22 # default channel which is not configured yet. So performance_schema.
23 # replication_applier_filters and SHOW SLAVE STATUS do not show it.
24 #
25 # Verify that default channel would copy global replication filters
26 # to its per-channel replication filters if there are no per-channel
27 # replication filters and there are global replication filters on the
28 # filter type when it is being configured. Then performance_schema.
29 # replication_applier_filters and SHOW SLAVE STATUS show it.
30 #
31 # Verify that "RESET SLAVE ALL" with no FOR CHANNEL clause removes all
32 # replication channels, so it shall remove all per-channel replication
33 # filters but does not touch all global replication filters. When the
34 # new channel is being configured, it therefore uses the global filters
35 # (copies all global replication filters to its own per-channel
36 # replication filters).
37 #
38 #########################################################################
39 include/master-slave.inc
40 Warnings:
41 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
42 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.
43 [connection master]
44 [connection slave]
45 #
46 # Verify that the "ch1" and "ch2" channels would copy the global
47 # replication filters to its own per-channel replication filters
48 # when they are being created and configured by CHANGE MASTER TO
49 # ... FOR CHANNEL.
50 #
51 SELECT COUNT(*) FROM performance_schema.replication_applier_global_filters;
52 COUNT(*)
53 2
54 SELECT FILTER_NAME, FILTER_RULE, CONFIGURED_BY FROM performance_schema.replication_applier_global_filters;
55 FILTER_NAME FILTER_RULE CONFIGURED_BY
56 REPLICATE_DO_DB global_db STARTUP_OPTIONS
57 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS
58 CHANGE REPLICATION SOURCE TO SOURCE_HOST="localhost", SOURCE_PORT=10 FOR CHANNEL "ch1";
59 CHANGE REPLICATION SOURCE TO SOURCE_HOST="localhost", SOURCE_PORT=11 FOR CHANNEL "ch2";
60 SELECT COUNT(*) FROM performance_schema.replication_applier_filters;
61 COUNT(*)
62 6
63 SELECT CHANNEL_NAME, FILTER_NAME, FILTER_RULE, CONFIGURED_BY, COUNTER FROM performance_schema.replication_applier_filters;
64 CHANNEL_NAME FILTER_NAME FILTER_RULE CONFIGURED_BY COUNTER
65 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
66 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
67 ch1 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
68 ch1 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
69 ch2 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
70 ch2 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
71 FLUSH RELAY LOGS;
72 FLUSH RELAY LOGS FOR CHANNEL "ch1";
73 FLUSH RELAY LOGS FOR CHANNEL "ch2";
74 #
75 # Show replication filters for channel 'ch1' and 'ch2' at beginning.
76 #
77 Replicate_Do_DB = 'global_db'
78 Replicate_Ignore_DB = ''
79 Replicate_Do_Table = ''
80 Replicate_Ignore_Table = ''
81 Replicate_Wild_Do_Table = 'global_db.t1%'
82 Replicate_Wild_Ignore_Table = ''
83 Replicate_Rewrite_DB = ''
84 Replicate_Do_DB = 'global_db'
85 Replicate_Ignore_DB = ''
86 Replicate_Do_Table = ''
87 Replicate_Ignore_Table = ''
88 Replicate_Wild_Do_Table = 'global_db.t1%'
89 Replicate_Wild_Ignore_Table = ''
90 Replicate_Rewrite_DB = ''
91 SELECT COUNT(*) FROM performance_schema.replication_applier_filters;
92 COUNT(*)
93 6
94 SELECT CHANNEL_NAME, FILTER_NAME, FILTER_RULE, CONFIGURED_BY, COUNTER FROM performance_schema.replication_applier_filters;
95 CHANNEL_NAME FILTER_NAME FILTER_RULE CONFIGURED_BY COUNTER
96 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
97 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
98 ch1 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
99 ch1 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
100 ch2 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
101 ch2 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
102 #
103 # RESET SLAVE FOR CHANNEL "ch1" deletes all relay log files of ch1.
104 #
105 RESET SLAVE FOR CHANNEL "ch1";
106 Warnings:
107 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
108 #
109 # Verify that "RESET SLAVE FOR CHANNEL '<channel_name>'" retains
110 # replication filters of the channel.
111 #
112 Replicate_Do_DB = 'global_db'
113 Replicate_Ignore_DB = ''
114 Replicate_Do_Table = ''
115 Replicate_Ignore_Table = ''
116 Replicate_Wild_Do_Table = 'global_db.t1%'
117 Replicate_Wild_Ignore_Table = ''
118 Replicate_Rewrite_DB = ''
119 SELECT COUNT(*) FROM performance_schema.replication_applier_filters;
120 COUNT(*)
121 6
122 SELECT CHANNEL_NAME, FILTER_NAME, FILTER_RULE, CONFIGURED_BY, COUNTER FROM performance_schema.replication_applier_filters;
123 CHANNEL_NAME FILTER_NAME FILTER_RULE CONFIGURED_BY COUNTER
124 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
125 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
126 ch1 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
127 ch1 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
128 ch2 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
129 ch2 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
130 slave-relay-bin-ch1.000001
131 slave-relay-bin-ch1.index
132 #
133 # RESET SLAVE deletes all relay log files of ch2
134 #
135 include/stop_slave.inc
136 RESET SLAVE;
137 Warnings:
138 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
139 #
140 # Verify that "RESET SLAVE" retains all replication filters from
141 # all replication channels.
142 #
143 Replicate_Do_DB = 'global_db'
144 Replicate_Ignore_DB = ''
145 Replicate_Do_Table = ''
146 Replicate_Ignore_Table = ''
147 Replicate_Wild_Do_Table = 'global_db.t1%'
148 Replicate_Wild_Ignore_Table = ''
149 Replicate_Rewrite_DB = ''
150 Replicate_Do_DB = 'global_db'
151 Replicate_Ignore_DB = ''
152 Replicate_Do_Table = ''
153 Replicate_Ignore_Table = ''
154 Replicate_Wild_Do_Table = 'global_db.t1%'
155 Replicate_Wild_Ignore_Table = ''
156 Replicate_Rewrite_DB = ''
157 SELECT COUNT(*) FROM performance_schema.replication_applier_filters;
158 COUNT(*)
159 6
160 SELECT CHANNEL_NAME, FILTER_NAME, FILTER_RULE, CONFIGURED_BY, COUNTER FROM performance_schema.replication_applier_filters;
161 CHANNEL_NAME FILTER_NAME FILTER_RULE CONFIGURED_BY COUNTER
162 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
163 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
164 ch1 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
165 ch1 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
166 ch2 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
167 ch2 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
168 slave-relay-bin-ch2.000001
169 slave-relay-bin-ch2.index
170 #
171 # RESET SLAVE resets relay log of default channel from .000001
172 #
173 #
174 # Relay log files for all channels are recreated automatically.
175 #
176 RESET SLAVE ALL FOR CHANNEL 'ch1';
177 Warnings:
178 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
179 #
180 # Verify that "'RESET SLAVE ALL FOR CHANNEL '<channel_name>'" removes
181 # the replication channel specified by 'FOR CHANNEL' clause and all
182 # replication filters of the channel. There is no effect to other
183 # channels.
184 #
185 RESET SLAVE ALL FOR CHANNEL 'ch1';
186 ERROR HY000: Replica channel 'ch1' does not exist.
187 SHOW SLAVE STATUS FOR CHANNEL 'ch1';
188 ERROR HY000: Replica channel 'ch1' does not exist.
189 SELECT COUNT(*) FROM performance_schema.replication_applier_filters;
190 COUNT(*)
191 4
192 SELECT CHANNEL_NAME, FILTER_NAME, FILTER_RULE, CONFIGURED_BY, COUNTER FROM performance_schema.replication_applier_filters;
193 CHANNEL_NAME FILTER_NAME FILTER_RULE CONFIGURED_BY COUNTER
194 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
195 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
196 ch2 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
197 ch2 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
198 RESET SLAVE ALL FOR CHANNEL '';
199 Warnings:
200 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
201 #
202 # "RESET SLAVE ALL FOR CHANNEL ''" removes the default channel and all
203 # replication filters of the channel firstly, but then create a new
204 # default channel which is not configured yet. So performance_schema.
205 # replication_applier_filters and SHOW SLAVE STATUS do not show it.
206 #
207 SELECT COUNT(*) FROM performance_schema.replication_applier_filters;
208 COUNT(*)
209 2
210 SELECT CHANNEL_NAME, FILTER_NAME, FILTER_RULE, CONFIGURED_BY, COUNTER FROM performance_schema.replication_applier_filters;
211 CHANNEL_NAME FILTER_NAME FILTER_RULE CONFIGURED_BY COUNTER
212 ch2 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
213 ch2 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
214 Replicate_Do_DB = 'No such row'
215 Replicate_Ignore_DB = 'No such row'
216 Replicate_Do_Table = 'No such row'
217 Replicate_Ignore_Table = 'No such row'
218 Replicate_Wild_Do_Table = 'No such row'
219 Replicate_Wild_Ignore_Table = 'No such row'
220 Replicate_Rewrite_DB = 'No such row'
221 #
222 # Verify that default channel would copy global replication filters
223 # to its per-channel replication filters if there are no per-channel
224 # replication filters and there are global replication filters on the
225 # filter type when it is being configured. Then performance_schema.
226 # replication_applier_filters and SHOW SLAVE STATUS show it.
227 #
228 CHANGE REPLICATION SOURCE TO SOURCE_HOST="127.0.0.1", SOURCE_PORT=MASTER_PORT,
229 SOURCE_USER="root" FOR CHANNEL '';
230 SELECT COUNT(*) FROM performance_schema.replication_applier_filters;
231 COUNT(*)
232 4
233 SELECT CHANNEL_NAME, FILTER_NAME, FILTER_RULE, CONFIGURED_BY, COUNTER FROM performance_schema.replication_applier_filters;
234 CHANNEL_NAME FILTER_NAME FILTER_RULE CONFIGURED_BY COUNTER
235 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
236 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
237 ch2 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
238 ch2 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
239 Replicate_Do_DB = 'global_db'
240 Replicate_Ignore_DB = ''
241 Replicate_Do_Table = ''
242 Replicate_Ignore_Table = ''
243 Replicate_Wild_Do_Table = 'global_db.t1%'
244 Replicate_Wild_Ignore_Table = ''
245 Replicate_Rewrite_DB = ''
246 #
247 # Verify that "RESET SLAVE ALL" with no FOR CHANNEL clause removes all
248 # replication channels, so it shall remove all per-channel replication
249 # filters but does not touch all global replication filters. When the
250 # new channel is being configured, it therefore uses the global filters
251 # (copies all global replication filters to its own per-channel
252 # replication filters).
253 #
254 RESET SLAVE ALL;
255 Warnings:
256 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
257 SHOW SLAVE STATUS FOR CHANNEL 'ch1';
258 ERROR HY000: Replica channel 'ch1' does not exist.
259 SHOW SLAVE STATUS FOR CHANNEL 'ch2';
260 ERROR HY000: Replica channel 'ch2' does not exist.
261 SELECT COUNT(*) FROM performance_schema.replication_applier_filters;
262 COUNT(*)
263 0
264 SELECT CHANNEL_NAME, FILTER_NAME, FILTER_RULE, CONFIGURED_BY, COUNTER FROM performance_schema.replication_applier_filters;
265 CHANNEL_NAME FILTER_NAME FILTER_RULE CONFIGURED_BY COUNTER
266 SELECT COUNT(*) FROM performance_schema.replication_applier_global_filters;
267 COUNT(*)
268 2
269 SELECT FILTER_NAME, FILTER_RULE, CONFIGURED_BY FROM performance_schema.replication_applier_global_filters;
270 FILTER_NAME FILTER_RULE CONFIGURED_BY
271 REPLICATE_DO_DB global_db STARTUP_OPTIONS
272 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS
273 CHANGE REPLICATION SOURCE TO SOURCE_HOST="127.0.0.1", SOURCE_PORT=MASTER_PORT,
274 SOURCE_USER="root";
275 SELECT COUNT(*) FROM performance_schema.replication_applier_filters;
276 COUNT(*)
277 2
278 SELECT CHANNEL_NAME, FILTER_NAME, FILTER_RULE, CONFIGURED_BY, COUNTER FROM performance_schema.replication_applier_filters;
279 CHANNEL_NAME FILTER_NAME FILTER_RULE CONFIGURED_BY COUNTER
280 REPLICATE_DO_DB global_db STARTUP_OPTIONS 0
281 REPLICATE_WILD_DO_TABLE global_db.t1% STARTUP_OPTIONS 0
282 include/start_slave.inc
283 include/rpl_end.inc