From 6a63204c362ad8c3f644226ea9032bbad8250d81 Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 29 Apr 2024 20:10:21 +0300 Subject: [PATCH] MDEV-34029 rpl.rpl_heartbeat can fail when (BB) mtr reorders tests rpl.rpl_heartbeat turns out to miss a standard include/master-slave header which made it potentially in BB and actually with manual mtr failing as it may have used a previous slave GTID state. Fixed with installing the standard rpl suite header/footer in the test file. --- mysql-test/suite/rpl/r/rpl_heartbeat.result | 7 ++++--- mysql-test/suite/rpl/t/rpl_heartbeat.test | 8 +++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat.result b/mysql-test/suite/rpl/r/rpl_heartbeat.result index 2a578245400..c9baf960d9a 100644 --- a/mysql-test/suite/rpl/r/rpl_heartbeat.result +++ b/mysql-test/suite/rpl/r/rpl_heartbeat.result @@ -1,8 +1,9 @@ -connect master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK; -connect slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK; +include/master-slave.inc +[connection master] connection master; reset master; connection slave; +include/stop_slave.inc set @restore_slave_net_timeout= @@global.slave_net_timeout; set @@global.slave_net_timeout= 10; change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; @@ -68,5 +69,5 @@ connection master; drop table t1; connection slave; set @@global.slave_net_timeout= @restore_slave_net_timeout; -include/stop_slave.inc +include/rpl_end.inc End of tests diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat.test b/mysql-test/suite/rpl/t/rpl_heartbeat.test index e4753b7be07..8a852fd3abf 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat.test @@ -8,14 +8,13 @@ # - SHOW STATUS like 'Slave_heartbeat_period' report -- source include/have_log_bin.inc - -connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); -connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK); +-- source include/master-slave.inc connection master; reset master; connection slave; +-- source include/stop_slave.inc set @restore_slave_net_timeout= @@global.slave_net_timeout; --disable_warnings set @@global.slave_net_timeout= 10; @@ -170,6 +169,5 @@ set @@global.slave_net_timeout= @restore_slave_net_timeout; --disable_prepare_warnings ---source include/stop_slave.inc - +--source include/rpl_end.inc --echo End of tests