summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t/rpl_parallel_sbm.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
commit347c164c35eddab388009470e6848cb361ac93f8 (patch)
tree2c0c44eac690f510bb0a35b2a13b36d606b77b6b /mysql-test/suite/rpl/t/rpl_parallel_sbm.test
parentReleasing progress-linux version 1:10.11.7-4~progress7.99u1. (diff)
downloadmariadb-347c164c35eddab388009470e6848cb361ac93f8.tar.xz
mariadb-347c164c35eddab388009470e6848cb361ac93f8.zip
Merging upstream version 1:10.11.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_parallel_sbm.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_sbm.test16
1 files changed, 13 insertions, 3 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_sbm.test b/mysql-test/suite/rpl/t/rpl_parallel_sbm.test
index 58c0db15..90753caf 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_sbm.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_sbm.test
@@ -1,9 +1,9 @@
#
# Ensure that Seconds_Behind_Master works correctly on the parallel replica.
#
---source include/master-slave.inc
--source include/have_log_bin.inc
--source include/have_debug.inc
+--source include/master-slave.inc
--echo #
--echo # MDEV-29639: Seconds_Behind_Master is incorrect for Delayed, Parallel Replicas
@@ -67,11 +67,18 @@ if (`SELECT $sbm_trx1_arrive > ($seconds_since_idling + 1)`)
--echo # if the event is still to be delayed, SBM should resume accordingly
--source include/stop_slave.inc
+
+--echo # Lock t1 on slave to ensure the event can't finish (and thereby update
+--echo # Seconds_Behind_Master) so slow running servers don't accidentally
+--echo # catch up to the master before checking SBM.
+--connection server_2
+LOCK TABLES t1 WRITE;
+
--source include/start_slave.inc
--connection slave
---echo # Waiting for replica to resume the delay for the transaction
---let $wait_condition= SELECT count(*) FROM information_schema.processlist WHERE state LIKE 'Waiting until MASTER_DELAY seconds after master executed event';
+--echo # Waiting for replica to get blocked by the table lock
+--let $wait_condition= SELECT count(*) FROM information_schema.processlist WHERE state LIKE 'Waiting for table metadata lock';
--source include/wait_condition.inc
--echo # Sleeping 1s to increment SBM
@@ -86,6 +93,9 @@ if (`SELECT $sbm_trx1_after_1s_sleep <= $sbm_trx1_arrive`)
}
--echo # ..done
+--connection server_2
+UNLOCK TABLES;
+
--source include/sync_with_master_gtid.inc
--echo #