Commit 945245ae authored by Andrei's avatar Andrei

MDEV-27697. Two affected tests fixed.

A result file is updated in one case and former error simulation got
refined.
parent 5100b20b
......@@ -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);
......
......@@ -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
......
......@@ -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';
......
......@@ -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 "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment