Skip to content

Commit 3f562bd

Browse files
author
Libing Song
committed
BUG#26148011 RPL.RPL_MULTI_SOURCE_CORRUPT_REPOSITORY
FAILS WITH RESULT CONTENT MISMATCH DESCRIPTION =========== The test uses show_relaylog_events.inc to show the content of some relay logs. the relay logs sometimes have different content. That caused test failures. ANALYSIS ======== The reason is that FLUSH LOGS is called immediately after slave is started. At the time, slave may or may not get Rotate/Format_description events from master. Most of the time, the events arrive before FLUSH LOGS and are written into the relay logs which are not showed by the test. But they sometime arrive just after FLUSH LOGS, so they are written to the relay logs which are showed by the test. FIX === The test just cares if SHOW RELAYLOG EVENTS FOR CHANNEL can be executed successfully, but not the result of the statement. So we just ignore the result by using --disable_result_log.
1 parent 439c5c7 commit 3f562bd

File tree

2 files changed

+13
-28
lines changed

2 files changed

+13
-28
lines changed

mysql-test/extra/rpl_tests/rpl_multi_source_corrupt_repository.inc

+4-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,10 @@ while ($i <= $number_of_channels)
293293

294294
--echo ===== Executing SHOW RELAYLOG EVENTS FOR CHANNEL on channel '$channel_name'.
295295
--let $rpl_channel_name=$channel_name
296-
--source include/show_relaylog_events.inc
296+
# It doesn't care the result, just make sure the query can be executed successfully
297+
--disable_result_log
298+
eval SHOW RELAYLOG EVENTS FOR CHANNEL '$channel_name';
299+
--enable_result_log
297300

298301
#############################################################################
299302
# Step 4.4: SHOW SLAVE STATUS FOR CHANNEL 'channel_name'

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

+9-27
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ include/assert.inc [MASTER_POS_WAIT should return NULL for channel '' and positi
102102
===== Executing FLUSH RELAY LOGS FOR CHANNEL on channel ''.
103103
FLUSH RELAY LOGS FOR CHANNEL '';
104104
===== Executing SHOW RELAYLOG EVENTS FOR CHANNEL on channel ''.
105-
include/show_relaylog_events.inc
105+
SHOW RELAYLOG EVENTS FOR CHANNEL '';
106106
===== Executing SHOW SLAVE FOR CHANNEL on channel ''.
107107
Warnings:
108108
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
@@ -145,10 +145,7 @@ include/assert.inc [MASTER_POS_WAIT should return -1 for channel 'channel_2' and
145145
===== Executing FLUSH RELAY LOGS FOR CHANNEL on channel 'channel_2'.
146146
FLUSH RELAY LOGS FOR CHANNEL 'channel_2';
147147
===== Executing SHOW RELAYLOG EVENTS FOR CHANNEL on channel 'channel_2'.
148-
include/show_relaylog_events.inc
149-
Log_name Pos Event_type Server_id End_log_pos Info
150-
msr-relaylog-channel_2.000006 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
151-
msr-relaylog-channel_2.000006 # Rotate # # msr-relaylog-channel_2.000007;pos=4
148+
SHOW RELAYLOG EVENTS FOR CHANNEL 'channel_2';
152149
===== Executing SHOW SLAVE FOR CHANNEL on channel 'channel_2'.
153150
Warnings:
154151
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
@@ -195,10 +192,7 @@ include/assert.inc [MASTER_POS_WAIT should return -1 for channel 'channel_3' and
195192
===== Executing FLUSH RELAY LOGS FOR CHANNEL on channel 'channel_3'.
196193
FLUSH RELAY LOGS FOR CHANNEL 'channel_3';
197194
===== Executing SHOW RELAYLOG EVENTS FOR CHANNEL on channel 'channel_3'.
198-
include/show_relaylog_events.inc
199-
Log_name Pos Event_type Server_id End_log_pos Info
200-
msr-relaylog-channel_3.000006 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
201-
msr-relaylog-channel_3.000006 # Rotate # # msr-relaylog-channel_3.000007;pos=4
195+
SHOW RELAYLOG EVENTS FOR CHANNEL 'channel_3';
202196
===== Executing SHOW SLAVE FOR CHANNEL on channel 'channel_3'.
203197
Warnings:
204198
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
@@ -329,10 +323,7 @@ include/assert.inc [MASTER_POS_WAIT should return -1 for channel '' and position
329323
===== Executing FLUSH RELAY LOGS FOR CHANNEL on channel ''.
330324
FLUSH RELAY LOGS FOR CHANNEL '';
331325
===== Executing SHOW RELAYLOG EVENTS FOR CHANNEL on channel ''.
332-
include/show_relaylog_events.inc
333-
Log_name Pos Event_type Server_id End_log_pos Info
334-
msr-relaylog.000008 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
335-
msr-relaylog.000008 # Rotate # # msr-relaylog.000009;pos=4
326+
SHOW RELAYLOG EVENTS FOR CHANNEL '';
336327
===== Executing SHOW SLAVE FOR CHANNEL on channel ''.
337328
Warnings:
338329
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
@@ -379,7 +370,7 @@ include/assert.inc [MASTER_POS_WAIT should return NULL for channel 'channel_2' a
379370
===== Executing FLUSH RELAY LOGS FOR CHANNEL on channel 'channel_2'.
380371
FLUSH RELAY LOGS FOR CHANNEL 'channel_2';
381372
===== Executing SHOW RELAYLOG EVENTS FOR CHANNEL on channel 'channel_2'.
382-
include/show_relaylog_events.inc
373+
SHOW RELAYLOG EVENTS FOR CHANNEL 'channel_2';
383374
===== Executing SHOW SLAVE FOR CHANNEL on channel 'channel_2'.
384375
Warnings:
385376
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
@@ -422,10 +413,7 @@ include/assert.inc [MASTER_POS_WAIT should return -1 for channel 'channel_3' and
422413
===== Executing FLUSH RELAY LOGS FOR CHANNEL on channel 'channel_3'.
423414
FLUSH RELAY LOGS FOR CHANNEL 'channel_3';
424415
===== Executing SHOW RELAYLOG EVENTS FOR CHANNEL on channel 'channel_3'.
425-
include/show_relaylog_events.inc
426-
Log_name Pos Event_type Server_id End_log_pos Info
427-
msr-relaylog-channel_3.000006 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
428-
msr-relaylog-channel_3.000006 # Rotate # # msr-relaylog-channel_3.000007;pos=4
416+
SHOW RELAYLOG EVENTS FOR CHANNEL 'channel_3';
429417
===== Executing SHOW SLAVE FOR CHANNEL on channel 'channel_3'.
430418
Warnings:
431419
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
@@ -556,10 +544,7 @@ include/assert.inc [MASTER_POS_WAIT should return -1 for channel '' and position
556544
===== Executing FLUSH RELAY LOGS FOR CHANNEL on channel ''.
557545
FLUSH RELAY LOGS FOR CHANNEL '';
558546
===== Executing SHOW RELAYLOG EVENTS FOR CHANNEL on channel ''.
559-
include/show_relaylog_events.inc
560-
Log_name Pos Event_type Server_id End_log_pos Info
561-
msr-relaylog.000008 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
562-
msr-relaylog.000008 # Rotate # # msr-relaylog.000009;pos=4
547+
SHOW RELAYLOG EVENTS FOR CHANNEL '';
563548
===== Executing SHOW SLAVE FOR CHANNEL on channel ''.
564549
Warnings:
565550
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
@@ -606,10 +591,7 @@ include/assert.inc [MASTER_POS_WAIT should return -1 for channel 'channel_2' and
606591
===== Executing FLUSH RELAY LOGS FOR CHANNEL on channel 'channel_2'.
607592
FLUSH RELAY LOGS FOR CHANNEL 'channel_2';
608593
===== Executing SHOW RELAYLOG EVENTS FOR CHANNEL on channel 'channel_2'.
609-
include/show_relaylog_events.inc
610-
Log_name Pos Event_type Server_id End_log_pos Info
611-
msr-relaylog-channel_2.000008 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
612-
msr-relaylog-channel_2.000008 # Rotate # # msr-relaylog-channel_2.000009;pos=4
594+
SHOW RELAYLOG EVENTS FOR CHANNEL 'channel_2';
613595
===== Executing SHOW SLAVE FOR CHANNEL on channel 'channel_2'.
614596
Warnings:
615597
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
@@ -656,7 +638,7 @@ include/assert.inc [MASTER_POS_WAIT should return NULL for channel 'channel_3' a
656638
===== Executing FLUSH RELAY LOGS FOR CHANNEL on channel 'channel_3'.
657639
FLUSH RELAY LOGS FOR CHANNEL 'channel_3';
658640
===== Executing SHOW RELAYLOG EVENTS FOR CHANNEL on channel 'channel_3'.
659-
include/show_relaylog_events.inc
641+
SHOW RELAYLOG EVENTS FOR CHANNEL 'channel_3';
660642
===== Executing SHOW SLAVE FOR CHANNEL on channel 'channel_3'.
661643
Warnings:
662644
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.

0 commit comments

Comments
 (0)