Skip to content

Commit

Permalink
MDEV-27963 multisource_for_channel sometimes fails in bb with result …
Browse files Browse the repository at this point in the history
…content mismatch

The problem was that SHOW SLAVE STATUS was exceuted before the slave IO
thread had time to create a new relay log

Fixed by writing a command on the master and syncing the slave data.
This ensures that the slave creates a new relay log.
  • Loading branch information
montywi committed Oct 19, 2022
1 parent ec2b30e commit 120a4ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mysql-test/suite/multi_source/multisource_for_channel.result
Expand Up @@ -279,6 +279,10 @@ Last_SQL_Errno = '0'
#
START SLAVE for channel 'master1';
include/wait_for_slave_to_start.inc
connection master1;
create table foo (a int);
drop table foo;
connection slave;

show slave status for channel 'master1'
Master_Port = 'MYPORT_1'
Expand Down
9 changes: 9 additions & 0 deletions mysql-test/suite/multi_source/multisource_for_channel.test
Expand Up @@ -326,6 +326,15 @@ STOP SLAVE for channel 'master1';
START SLAVE for channel 'master1';
--source include/wait_for_slave_to_start.inc

# Force some data into the relay log to ensure that we get a new relay log
--connection master1
create table foo (a int);
drop table foo;
--save_master_pos
--connection slave
--sync_with_master 0,'master1'
--source include/wait_for_sql_thread_read_all.inc

--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
Expand Down

0 comments on commit 120a4ca

Please sign in to comment.