Description:
The MTR test in MySQL 8.0.43 for Bug#37024069, rpl_semi_sync_binlog_suffix_exceed_six_digit.test doesn't test the scenario of the fix.
According to the comments in the test file, an INSERT statement is executed on the master which checks if the the replication type is switched to async or not.
# ==== Implementation ====
# 1. Initial setup
# 2. Reset the binary log and set the suffix to 999999.
# 3. Start replicating from the binlog file with suffix 999999.
# 4. Insert 2 rows, this will cause binary log to rotate
# from six digit suffix to seven digit suffix
# 5. Stop the replica
# 6. Execute an insert on source and verify that it doesn't commit even after
# a sleep of 1 second. The source will commit after the
# rpl_semi_sync_source_timeout.
# 7. Start the replica.
# 8. Cleanup.
But, in the test the INSERT statement is performed on the SLAVE which is not what was intended and the test passes without the fix.
--echo #
--echo # 6. Execute an insert on source and verify that it doesn't commit even
--echo # after a sleep of 1 second. The source will commit after the
--echo # rpl_semi_sync_source_timeout.
--echo #
--source include/rpl_connection_slave.inc
--let $row_count_before= `SELECT COUNT(*) FROM t2`
--let $yes_tx_before = query_get_value(SHOW STATUS LIKE 'Rpl_semi_sync_yes_tx', Value, 1)
--send INSERT INTO t2 VALUES ('a')
--sleep 1
--source include/rpl_connection_master1.inc
--let $row_count_after= `SELECT COUNT(*) FROM t2`
--let $yes_tx_after = query_get_value(SHOW STATUS LIKE 'Rpl_semi_sync_yes_tx', Value, 1)
# When the replica is stopped, the INSERT query will only succeed
# after the value for rpl_semi_sync_source_timeout elapses.
--let $assert_text = Row count has not been updated
--let $assert_cond = "$row_count_before" = "$row_count_after"
--source include/assert.inc
# The number of commits that were acknowledged successfully by a replica
# should remain unchanged.
--let $assert_text = Status variable Rpl_semi_sync_yes_tx is unchanged
--let $assert_cond = "$yes_tx_before" = "$yes_tx_after"
--source include/assert.inc
--source include/rpl_connection_slave.inc
--reap;
How to repeat:
Run the MTR test rpl_semi_sync_binlog_suffix_exceed_six_digit without the fix.