From ccf5cb57dbb5733594670decacd0cbf77d48c404 Mon Sep 17 00:00:00 2001 From: Pekka Lampio Date: Thu, 3 Jul 2025 14:56:34 +0300 Subject: [PATCH 1/2] Bug fix for the MTR test galera.galera_bf_abort_lock_table (MDEV-36598). Sometimes the MTR test galera.galera_bf_abort_lock_table failed with a timeout. The root cause for the failure was an error in the logic of the MTR test: it was possible that a table created on node 1 was not replicated to node 2 before an attempt was made to lock it on node 2. This resulted in a timeout later in the test. --- mysql-test/suite/galera/t/galera_bf_abort_lock_table.test | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mysql-test/suite/galera/t/galera_bf_abort_lock_table.test b/mysql-test/suite/galera/t/galera_bf_abort_lock_table.test index 71c3a7198f2b9..909abebc61a4e 100644 --- a/mysql-test/suite/galera/t/galera_bf_abort_lock_table.test +++ b/mysql-test/suite/galera/t/galera_bf_abort_lock_table.test @@ -8,6 +8,11 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; --connection node_2 +# Wait for Galera to replicate "CREATE TABLE t1" to node_2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--let $wait_condition_on_error_output = SHOW ALL SLAVES STATUS; +--source include/wait_condition_with_debug.inc + SET AUTOCOMMIT=OFF; --let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` LOCK TABLE t1 WRITE; From f69cbbf11bceb7ef733bd336cccd41950294727f Mon Sep 17 00:00:00 2001 From: Pekka Lampio Date: Fri, 4 Jul 2025 09:01:14 +0300 Subject: [PATCH 2/2] Improve the MTR test galera.galera_bf_abort_lock_table by removing the error output of the wait condition for CREATE TABLE replication. --- mysql-test/suite/galera/t/galera_bf_abort_lock_table.test | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/suite/galera/t/galera_bf_abort_lock_table.test b/mysql-test/suite/galera/t/galera_bf_abort_lock_table.test index 909abebc61a4e..de25e1a3a36cb 100644 --- a/mysql-test/suite/galera/t/galera_bf_abort_lock_table.test +++ b/mysql-test/suite/galera/t/galera_bf_abort_lock_table.test @@ -10,7 +10,6 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; --connection node_2 # Wait for Galera to replicate "CREATE TABLE t1" to node_2 --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; ---let $wait_condition_on_error_output = SHOW ALL SLAVES STATUS; --source include/wait_condition_with_debug.inc SET AUTOCOMMIT=OFF;