diff options
author | Andrei <andrei.elkin@mariadb.com> | 2022-04-26 17:03:32 +0300 |
---|---|---|
committer | Andrei <andrei.elkin@mariadb.com> | 2022-04-26 17:05:40 +0300 |
commit | 945245aea4baf5399470ec0cff5d5d51c36a95d6 (patch) | |
tree | 79f47654f84ca6974c77b622cedc3b7226e584c9 | |
parent | 5100b20b15edd93200f34a79d25f1b14e46a677e (diff) | |
download | mariadb-git-945245aea4baf5399470ec0cff5d5d51c36a95d6.tar.gz |
MDEV-27697. Two affected tests fixed.
A result file is updated in one case and former error simulation got
refined.
-rw-r--r-- | mysql-test/suite/binlog_encryption/rpl_parallel.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_parallel_temptable.result | 5 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_parallel_temptable.test | 8 | ||||
-rw-r--r-- | sql/slave.cc | 6 |
4 files changed, 18 insertions, 2 deletions
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel.result b/mysql-test/suite/binlog_encryption/rpl_parallel.result index 12e5455c6c1..79efad1a27a 100644 --- a/mysql-test/suite/binlog_encryption/rpl_parallel.result +++ b/mysql-test/suite/binlog_encryption/rpl_parallel.result @@ -1379,6 +1379,7 @@ include/stop_slave.inc SET GLOBAL slave_parallel_threads=1; SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000"; +CALL mtr.add_suppression("Unexpected break of being relay-logged GTID"); connection server_1; INSERT INTO t2 VALUES (101); INSERT INTO t2 VALUES (102); diff --git a/mysql-test/suite/rpl/r/rpl_parallel_temptable.result b/mysql-test/suite/rpl/r/rpl_parallel_temptable.result index 52efed22541..1a1c12f836d 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_temptable.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_temptable.result @@ -132,8 +132,13 @@ connection server_1; INSERT INTO t1 VALUES (0, 1); include/save_master_gtid.inc connection server_2; +set @@sql_log_bin=0; +call mtr.add_suppression("Unexpected break of being relay-logged GTID 1-1-32 event group by the current GTID event 0-1-4"); +set @@sql_log_bin=1; +set @@global.debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000"; include/start_slave.inc include/sync_with_master_gtid.inc +set @@global.debug_dbug=""; SELECT * FROM t1 ORDER BY a; a b 0 1 diff --git a/mysql-test/suite/rpl/t/rpl_parallel_temptable.test b/mysql-test/suite/rpl/t/rpl_parallel_temptable.test index 04165ee4752..d444793a99d 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_temptable.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_temptable.test @@ -201,9 +201,17 @@ INSERT INTO t1 VALUES (0, 1); # execution of format_description event will not wait infinitely # for a commit of the incomplete group that never happens. +# Apart from the suppression, MDEV-27697 refinement to the original test needs +# an allowance to one time accept malformed event group. +set @@sql_log_bin=0; +call mtr.add_suppression("Unexpected break of being relay-logged GTID 1-1-32 event group by the current GTID event 0-1-4"); +set @@sql_log_bin=1; +set @@global.debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000"; + --source include/start_slave.inc #--sync_with_master --source include/sync_with_master_gtid.inc +set @@global.debug_dbug=""; SELECT * FROM t1 ORDER BY a; SHOW STATUS LIKE 'Slave_open_temp_tables'; diff --git a/sql/slave.cc b/sql/slave.cc index 31e50753c9e..0d50e8b0c61 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -6223,8 +6223,10 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) DBUG_EXECUTE_IF("slave_discard_xid_for_gtid_0_x_1000", { /* Inject an event group that is missing its XID commit event. */ - if (mi->last_queued_gtid.domain_id == 0 && - mi->last_queued_gtid.seq_no == 1000) + if ((mi->last_queued_gtid.domain_id == 0 && + mi->last_queued_gtid.seq_no == 1000) || + (mi->last_queued_gtid.domain_id == 1 && + mi->last_queued_gtid.seq_no == 32)) { sql_print_warning( "Unexpected break of being relay-logged GTID %u-%u-%llu " |