Debian Codegraph @

mysql-test/suite/multi_source/multisource_for_channel.result

raw
1 RESET MASTER;
2 connect slave,127.0.0.1,root,,,$SERVER_MYPORT_3;
3 change master to relay_log_file='' for channel 'abc1';
4 ERROR HY000: Failed initializing relay log position: Could not find target log during relay log initialization
5 change master to master_host='' for channel 'abc2';
6 ERROR HY000: Incorrect arguments to MASTER_HOST
7 change master to
8 master_port=MYPORT_1,
9 master_host='127.0.0.1',
10 master_user='root', master_ssl_verify_server_cert=0,
11 master_use_gtid=no
12 for channel 'master1';
13 start slave for channel 'master1';
14 set default_master_connection = 'master1';
15 include/wait_for_slave_to_start.inc
16 connect master1,127.0.0.1,root,,,$SERVER_MYPORT_1;
17 connection slave;
18 #
19 # Checking SHOW SLAVE 'master1' STATUS
20 #
21 Master_Port = 'MYPORT_1'
22 Relay_Log_File = 'mysqld-relay-bin-master1.000002'
23 Slave_IO_Running = 'Yes'
24 Slave_SQL_Running = 'Yes'
25 Last_Errno = '0'
26 Last_SQL_Errno = '0'
27 #
28 # Checking SHOW SLAVE STATUS
29 #
30 Master_Port = 'MYPORT_1'
31 Relay_Log_File = 'mysqld-relay-bin-master1.000002'
32 Slave_IO_Running = 'Yes'
33 Slave_SQL_Running = 'Yes'
34 Last_Errno = '0'
35 Last_SQL_Errno = '0'
36 #
37 # Checking SHOW ALL SLAVES STATUS
38 #
39 Connection_name = 'master1'
40 Master_Port = 'MYPORT_1'
41 Relay_Log_File = 'mysqld-relay-bin-master1.000002'
42 Slave_IO_Running = 'Yes'
43 Slave_SQL_Running = 'Yes'
44 Last_Errno = '0'
45 Last_SQL_Errno = '0'
46 Slave_heartbeat_period = '60.000'
47 #
48 connection master1;
49 drop database if exists db1;
50 create database db1;
51 use db1;
52 create table t1 (i int auto_increment, f1 varchar(16), primary key pk (i,f1)) engine=MyISAM;
53 Warnings:
54 Warning 1280 Name 'pk' ignored for PRIMARY key.
55 insert into t1 (f1) values ('one'),('two');
56 connection slave;
57 select * from db1.t1;
58 i f1
59 1 one
60 2 two
61 # List of relay log files in the datadir
62 mysqld-relay-bin-master1.000001
63 mysqld-relay-bin-master1.000002
64 mysqld-relay-bin-master1.index
65 include/show_events.inc
66 Log_name Pos Event_type Server_id End_log_pos Info
67 mysqld-relay-bin-master1.000001 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
68 mysqld-relay-bin-master1.000001 # Rotate # # mysqld-relay-bin-master1.000002;pos=4
69 include/show_events.inc
70 Log_name Pos Event_type Server_id End_log_pos Info
71 mysqld-relay-bin-master1.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
72 mysqld-relay-bin-master1.000002 # Rotate # # master-bin.000001;pos=POS
73 mysqld-relay-bin-master1.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
74 mysqld-relay-bin-master1.000002 # Gtid_list # # []
75 mysqld-relay-bin-master1.000002 # Binlog_checkpoint # # master-bin.000001
76 mysqld-relay-bin-master1.000002 # Gtid # # GTID #-#-#
77 mysqld-relay-bin-master1.000002 # Query # # drop database if exists db1
78 mysqld-relay-bin-master1.000002 # Gtid # # GTID #-#-#
79 mysqld-relay-bin-master1.000002 # Query # # create database db1
80 mysqld-relay-bin-master1.000002 # Gtid # # GTID #-#-#
81 mysqld-relay-bin-master1.000002 # Query # # use `db1`; create table t1 (i int auto_increment, f1 varchar(16), primary key pk (i,f1)) engine=MyISAM
82 mysqld-relay-bin-master1.000002 # Gtid # # BEGIN GTID #-#-#
83 mysqld-relay-bin-master1.000002 # Intvar # # INSERT_ID=1
84 mysqld-relay-bin-master1.000002 # Query # # use `db1`; insert into t1 (f1) values ('one'),('two')
85 mysqld-relay-bin-master1.000002 # Query # # COMMIT
86 change master to
87 master_port=MYPORT_2,
88 master_host='127.0.0.1',
89 master_user='root'
90 for channel 'master1';
91 ERROR HY000: This operation cannot be performed as you have a running slave 'master1'; run STOP SLAVE 'master1' first
92 change master to
93 master_port=MYPORT_2,
94 master_host='127.0.0.1',
95 master_user='root';
96 ERROR HY000: This operation cannot be performed as you have a running slave 'master1'; run STOP SLAVE 'master1' first
97 change master to
98 master_port=MYPORT_1,
99 master_host='127.0.0.1',
100 master_user='root' for channel 'master2';
101 ERROR HY000: Connection 'master2' conflicts with existing connection 'master1'
102 set default_master_connection = '';
103 change master to
104 master_port=MYPORT_2,
105 master_host='127.0.0.1',
106 master_user='root', master_ssl_verify_server_cert=0,
107 master_use_gtid=no;
108 start slave;
109 include/wait_for_slave_to_start.inc
110 #
111 # Checking SHOW ALL SLAVES STATUS
112 #
113 Connection_name = ''
114 Connection_name = 'master1'
115 Master_Port = 'MYPORT_2'
116 Master_Port = 'MYPORT_1'
117 Relay_Log_File = 'mysqld-relay-bin.000002'
118 Relay_Log_File = 'mysqld-relay-bin-master1.000002'
119 Slave_IO_Running = 'Yes'
120 Slave_IO_Running = 'Yes'
121 Slave_SQL_Running = 'Yes'
122 Slave_SQL_Running = 'Yes'
123 Last_Errno = '0'
124 Last_Errno = '0'
125 Last_SQL_Errno = '0'
126 Last_SQL_Errno = '0'
127 Slave_heartbeat_period = '60.000'
128 Slave_heartbeat_period = '60.000'
129 #
130 connection master1;
131 insert into t1 (f1) values ('three');
132 connect master2,127.0.0.1,root,,,$SERVER_MYPORT_2;
133 drop database if exists db2;
134 create database db2;
135 use db2;
136 create table t1 (pk int auto_increment primary key, f1 int) engine=InnoDB;
137 begin;
138 insert into t1 (f1) values (1),(2);
139 connection slave;
140 connection master2;
141 connection slave;
142 select * from db1.t1;
143 i f1
144 1 one
145 2 two
146 3 three
147 select * from db2.t1;
148 pk f1
149 connection master2;
150 commit;
151 connection slave;
152 select * from db2.t1;
153 pk f1
154 1 1
155 2 2
156 connection master1;
157 flush logs;
158 connection slave;
159 connection master1;
160 purge binary logs to 'master-bin.000002';
161 show binary logs;
162 Log_name File_size
163 master-bin.000002 filesize
164 insert into t1 (f1) values ('four');
165 create table db1.t3 (f1 int) engine=InnoDB;
166 connection slave;
167 #
168 # Checking SHOW ALL SLAVES STATUS
169 #
170 Connection_name = ''
171 Connection_name = 'master1'
172 Master_Port = 'MYPORT_2'
173 Master_Port = 'MYPORT_1'
174 Relay_Log_File = 'mysqld-relay-bin.000002'
175 Relay_Log_File = 'mysqld-relay-bin-master1.000004'
176 Slave_IO_Running = 'Yes'
177 Slave_IO_Running = 'Yes'
178 Slave_SQL_Running = 'Yes'
179 Slave_SQL_Running = 'Yes'
180 Last_Errno = '0'
181 Last_Errno = '0'
182 Last_SQL_Errno = '0'
183 Last_SQL_Errno = '0'
184 Slave_heartbeat_period = '60.000'
185 Slave_heartbeat_period = '60.000'
186 #
187 #
188 # MDEV:16437: merge 5.7 P_S replication instrumentation and tables
189 #
190 SELECT * FROM performance_schema.replication_applier_status_by_coordinator;
191 CHANNEL_NAME master1
192 THREAD_ID #
193 SERVICE_STATE ON
194 LAST_ERROR_NUMBER 0
195 LAST_ERROR_MESSAGE
196 LAST_ERROR_TIMESTAMP 0000-00-00 00:00:00
197 LAST_SEEN_TRANSACTION 0-1-7
198 LAST_TRANS_RETRY_COUNT 0
199 CHANNEL_NAME
200 THREAD_ID #
201 SERVICE_STATE ON
202 LAST_ERROR_NUMBER 0
203 LAST_ERROR_MESSAGE
204 LAST_ERROR_TIMESTAMP 0000-00-00 00:00:00
205 LAST_SEEN_TRANSACTION 0-2-4
206 LAST_TRANS_RETRY_COUNT 0
207 select * from db1.t1;
208 i f1
209 1 one
210 2 two
211 3 three
212 4 four
213 include/show_events.inc
214 Log_name Pos Event_type Server_id End_log_pos Info
215 mysqld-relay-bin.000001 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
216 mysqld-relay-bin.000001 # Rotate # # mysqld-relay-bin.000002;pos=4
217 include/show_events.inc
218 Log_name Pos Event_type Server_id End_log_pos Info
219 mysqld-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
220 mysqld-relay-bin.000002 # Rotate # # master-bin.000001;pos=POS
221 mysqld-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
222 mysqld-relay-bin.000002 # Gtid_list # # []
223 mysqld-relay-bin.000002 # Binlog_checkpoint # # master-bin.000001
224 mysqld-relay-bin.000002 # Gtid # # GTID #-#-#
225 mysqld-relay-bin.000002 # Query # # drop database if exists db2
226 mysqld-relay-bin.000002 # Gtid # # GTID #-#-#
227 mysqld-relay-bin.000002 # Query # # create database db2
228 mysqld-relay-bin.000002 # Gtid # # GTID #-#-#
229 mysqld-relay-bin.000002 # Query # # use `db2`; create table t1 (pk int auto_increment primary key, f1 int) engine=InnoDB
230 mysqld-relay-bin.000002 # Gtid # # BEGIN GTID #-#-#
231 mysqld-relay-bin.000002 # Intvar # # INSERT_ID=1
232 mysqld-relay-bin.000002 # Query # # use `db2`; insert into t1 (f1) values (1),(2)
233 mysqld-relay-bin.000002 # Xid # # COMMIT /* XID */
234 disconnect slave;
235 connect slave,127.0.0.1,root,,,$SERVER_MYPORT_3;
236 stop slave io_thread;
237 show status like 'Slave_running';
238 Variable_name Value
239 Slave_running OFF
240 set default_master_connection = 'master1';
241 show status like 'Slave_running';
242 Variable_name Value
243 Slave_running ON
244
245 #
246 # syntax compatible test
247 #
248
249 #
250 # show relaylog events
251 #
252 SHOW RELAYLOG EVENTS for channel 'master1';
253 Log_name Pos Event_type Server_id End_log_pos Info
254 mysqld-relay-bin-master1.000003 4 Format_desc 3 256 Server ver: Version
255 mysqld-relay-bin-master1.000003 256 Rotate 1 1358 master-bin.000002;pos=4
256 mysqld-relay-bin-master1.000003 304 Rotate 3 366 mysqld-relay-bin-master1.000004;pos=4
257
258 show slave status for channel 'master1'
259 Master_Port = 'MYPORT_1'
260 Relay_Log_File = 'mysqld-relay-bin-master1.000004'
261 Slave_IO_Running = 'Yes'
262 Slave_SQL_Running = 'Yes'
263 Last_Errno = '0'
264 Last_SQL_Errno = '0'
265
266 #
267 # stop slave
268 #
269 STOP SLAVE for channel 'master1';
270
271 show slave status for channel 'master1'
272 Master_Port = 'MYPORT_1'
273 Relay_Log_File = 'mysqld-relay-bin-master1.000004'
274 Slave_IO_Running = 'No'
275 Slave_SQL_Running = 'No'
276 Last_Errno = '0'
277 Last_SQL_Errno = '0'
278
279 #
280 # start slave
281 #
282 START SLAVE for channel 'master1';
283 include/wait_for_slave_to_start.inc
284 connection master1;
285 create table foo (a int);
286 drop table foo;
287 connection slave;
288
289 show slave status for channel 'master1'
290 Master_Port = 'MYPORT_1'
291 Relay_Log_File = 'mysqld-relay-bin-master1.000005'
292 Slave_IO_Running = 'Yes'
293 Slave_SQL_Running = 'Yes'
294 Last_Errno = '0'
295 Last_SQL_Errno = '0'
296
297 #
298 # flush relay logs
299 #
300 FLUSH RELAY LOGS for channel 'master1';
301
302 show slave status for channel 'master1'
303 Master_Port = 'MYPORT_1'
304 Relay_Log_File = 'mysqld-relay-bin-master1.000006'
305 Slave_IO_Running = 'Yes'
306 Slave_SQL_Running = 'Yes'
307 Last_Errno = '0'
308 Last_SQL_Errno = '0'
309
310 #
311 # stop slave
312 #
313 STOP SLAVE for channel 'master1';
314
315 show slave status for channel 'master1'
316 Master_Port = 'MYPORT_1'
317 Relay_Log_File = 'mysqld-relay-bin-master1.000006'
318 Slave_IO_Running = 'No'
319 Slave_SQL_Running = 'No'
320 Last_Errno = '0'
321 Last_SQL_Errno = '0'
322
323 #
324 # reset slave
325 #
326 RESET SLAVE for channel 'master1';
327 Warnings:
328 Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
329
330 show slave status for channel 'master1'
331 Master_Port = 'MYPORT_1'
332 Relay_Log_File = ''
333 Slave_IO_Running = 'No'
334 Slave_SQL_Running = 'No'
335 Last_Errno = '0'
336 Last_SQL_Errno = '0'
337
338 #
339 # show relaylog events after reset slave
340 #
341 SHOW RELAYLOG EVENTS for channel 'master1';
342 Log_name Pos Event_type Server_id End_log_pos Info
343
344 #
345 # check error syntax
346 #
347 RESET SLAVE 'master1' for channel 'mmaster2';
348 ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
349 STOP SLAVE 'master1' for channel 'master2';
350 ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
351 FLUSH RELAY LOGS 'master1' for channel 'master2';
352 ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
353 START SLAVE 'master1' for channel 'master2';
354 ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
355 SHOW RELAYLOG 'master1' EVENTS for channel 'master2';
356 ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
357 SHOW SLAVE 'master1' STATUS for channel 'master2';
358 ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
359
360 drop database db1;
361 drop database db2;
362 include/reset_master_slave.inc
363 disconnect slave;
364 connection master1;
365 drop database db1;
366 include/reset_master_slave.inc
367 disconnect master1;
368 connection master2;
369 drop database db2;
370 include/reset_master_slave.inc
371 disconnect master2;
372 connection default;
373 CREATE TABLE channel (channel int);
374 DROP TABLE channel;