From 2808f01e8e31a5ccc8e51a3a4a03d9481581bcc9 Mon Sep 17 00:00:00 2001 From: Andrei Date: Tue, 1 Mar 2022 14:07:07 +0200 Subject: MDEV-27963 multisource_for_channel sometimes fails in bb with result content mismatch The mismatch with the result file was caused by asynchronicity START-SLAVE caused relay log rotation and the respective SHOW-SLAVE-STATUS' field check. Fixed with masking two possible results with a single pattern. A more complicated alternative solution of waiting for the end of relay-log rotation is waived because the test does not really require the exact relay-log name. --- mysql-test/suite/multi_source/multisource_for_channel.result | 2 +- mysql-test/suite/multi_source/multisource_for_channel.test | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/multi_source/multisource_for_channel.result b/mysql-test/suite/multi_source/multisource_for_channel.result index f96a5a93b97..56409bbc6ce 100644 --- a/mysql-test/suite/multi_source/multisource_for_channel.result +++ b/mysql-test/suite/multi_source/multisource_for_channel.result @@ -282,7 +282,7 @@ include/wait_for_slave_to_start.inc show slave status for channel 'master1' Master_Port = 'MYPORT_1' -Relay_Log_File = 'mysqld-relay-bin-master1.000005' +Relay_Log_File = 'mysqld-relay-bin-master1.00000[45]' Slave_IO_Running = 'Yes' Slave_SQL_Running = 'Yes' Last_Errno = '0' diff --git a/mysql-test/suite/multi_source/multisource_for_channel.test b/mysql-test/suite/multi_source/multisource_for_channel.test index 9b74ea97742..19200e5b926 100644 --- a/mysql-test/suite/multi_source/multisource_for_channel.test +++ b/mysql-test/suite/multi_source/multisource_for_channel.test @@ -329,7 +329,9 @@ START SLAVE for channel 'master1'; --echo --echo show slave status for channel 'master1' --let $status_items= Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno ---let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/ /Preparing/Yes/ +# Relay log rotation from 4 to 5 is asynchronous with the show-slave-status, +# so both possible results are masked as [45]. +--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/ /Preparing/Yes/ /000004/00000[45]/ /000005/00000[45]/ --let $slave_name= 'master1' --let $for_channel= 1 --source include/show_slave_status.inc -- cgit v1.2.1