From 812443c251e163b83252638a3229cc6d48e61a5f Mon Sep 17 00:00:00 2001 From: Brandon Nesterenko Date: Tue, 27 Sep 2022 10:31:24 -0600 Subject: MDEV-29607: binlog.binlog_checkpoint fails in buildbot with result content mismatch Problem: ======== There is a race condition in binlog.binlog_checkpoint between the binlog background thread creating a binlog checkpoint event, and the connection thread binlogging a query event for creating a table. Because the test outputs the events for validation, the order between these two events can be different, resulting in a failed test. Solution: ======== Instead of outputting the binlog events, use assert_grep to validate the content of the binlog is correct. Reviewed By: ============ Andrei Elkin --- mysql-test/suite/binlog/r/binlog_checkpoint.result | 25 +++------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'mysql-test/suite/binlog/r') diff --git a/mysql-test/suite/binlog/r/binlog_checkpoint.result b/mysql-test/suite/binlog/r/binlog_checkpoint.result index 7578a9fc6d9..a00b1c0c1a3 100644 --- a/mysql-test/suite/binlog/r/binlog_checkpoint.result +++ b/mysql-test/suite/binlog/r/binlog_checkpoint.result @@ -164,28 +164,9 @@ connection default; SET GLOBAL debug_dbug="+d,only_kill_system_threads_no_loop"; # restart ** Proof of shutdown caused ROLLBACK-completed transaction -include/show_binlog_events.inc -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -master-bin.000002 # Gtid_list # # [] -master-bin.000002 # Binlog_checkpoint # # master-bin.000001 -master-bin.000002 # Binlog_checkpoint # # master-bin.000002 -master-bin.000002 # Gtid # # GTID #-#-# -master-bin.000002 # Query # # use `test`; CREATE TABLE tm (a INT) ENGINE = myisam -master-bin.000002 # Gtid # # BEGIN GTID #-#-# -master-bin.000002 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Table \'./test/tm\' is marked as crashed' COLLATE 'latin1_swedish_ci')) -master-bin.000002 # Query # # COMMIT -master-bin.000002 # Gtid # # BEGIN GTID #-#-# -master-bin.000002 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Checking table' COLLATE 'latin1_swedish_ci')) -master-bin.000002 # Query # # COMMIT -master-bin.000002 # Gtid # # BEGIN GTID #-#-# -master-bin.000002 # Query # # use `test`; INSERT INTO tm SET a = 1 -master-bin.000002 # Query # # COMMIT -master-bin.000002 # Gtid # # BEGIN GTID #-#-# -master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (2, 1) -master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (3, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") -master-bin.000002 # Query # # ROLLBACK -master-bin.000002 # Rotate # # master-bin.000003;pos=POS +# MYSQL_BINLOG datadir/binlog_file --result-file=assert_file +include/assert_grep.inc [No XA statements should be written into the binary log] +include/assert_grep.inc [The transaction should be rolled back] SELECT * FROM tm; a 1 -- cgit v1.2.1