1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-36424: binlog_encryption.encrypted_master_switch_to_unencrypted_gtid Fails in BB 11.4+

The test case was missing a wait for the SQL thread to complete its work before checking the value of @@GLOBAL.gtid_slave_pos.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2025-03-28 19:20:16 +01:00
parent f5bd250f5b
commit 8010a4128d
2 changed files with 10 additions and 0 deletions

View File

@ -59,6 +59,9 @@ INSERT INTO table3_no_encryption SELECT NULL,NOW(),b FROM table3_no_encryption;
connection server_2;
start slave;
include/wait_for_slave_io_error.inc [errno=1236]
SELECT MASTER_GTID_WAIT("LAST_UNENCRYPTED_GTID", 60);
MASTER_GTID_WAIT("LAST_UNENCRYPTED_GTID", 60)
0
# Ensuring slave was unable to replicate any encrypted transactions..
# ..success
SHOW TABLES;

View File

@ -122,6 +122,13 @@ start slave;
--let $slave_io_errno= 1236
--source include/wait_for_slave_io_error.inc
# Wait for the SQL thread to have replicated to the expected point. Otherwise
# there is a race where the IO thread can stop with error and the test case
# check the @@GLOBAL.gtid_slave_pos before the SQL thread has had time to
# replicate the events queued by the IO thread (MDEV-36424).
--replace_result "$last_unencrypted_gtid" "LAST_UNENCRYPTED_GTID"
eval SELECT MASTER_GTID_WAIT("$last_unencrypted_gtid", 60);
--echo # Ensuring slave was unable to replicate any encrypted transactions..
--let $gsp= `SELECT @@global.gtid_slave_pos`
if (`SELECT strcmp("$gsp","$last_unencrypted_gtid")`)