1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-14721 Big transaction events get lost on semisync master when

replicate_events_marked_for_skip=FILTER_ON_MASTER

When events of a big transaction are binlogged offsetting over 2GB from
the beginning of the log the semisync master's dump thread
lost such events.
The events were skipped by the Dump thread that found their skipping
status erroneously.

The current fixes make sure the skipping status is computed correctly.
The test verifies them simulating the 2GB offset.
This commit is contained in:
Andrei Elkin
2018-01-26 23:26:39 +02:00
committed by Monty
parent 0d31b4b328
commit c09371dce6
4 changed files with 96 additions and 5 deletions

View File

@ -1904,11 +1904,8 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type,
*/
if (info->thd->variables.option_bits & OPTION_SKIP_REPLICATION)
{
/*
The first byte of the packet is a '\0' to distinguish it from an error
packet. So the actual event starts at offset +1.
*/
uint16 event_flags= uint2korr(&((*packet)[FLAGS_OFFSET+1]));
uint16 event_flags= uint2korr(&((*packet)[FLAGS_OFFSET + ev_offset]));
if (event_flags & LOG_EVENT_SKIP_REPLICATION_F)
return NULL;
}