diff options
author | Andrei Elkin <andrei.elkin@mariadb.com> | 2018-01-26 23:26:39 +0200 |
---|---|---|
committer | Andrei Elkin <andrei.elkin@mariadb.com> | 2018-03-12 17:07:06 +0200 |
commit | 9005108234ca97ce9e86935fd79ea0b3fb97ec43 (patch) | |
tree | 6c4b3ccb27dba8852916b57324c293d5fa1da985 /sql/sql_repl.cc | |
parent | 12f9cf075f183c1c681b89f0f9b7f7c07d84dcbf (diff) | |
download | mariadb-git-9005108234ca97ce9e86935fd79ea0b3fb97ec43.tar.gz |
MDEV-14721 Big transaction events get lost on semisync master when
replicate_events_marked_for_skip=FILTER_ON_MASTER
[Note this is a cherry-pick from 10.2 branch.]
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.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index b5cca334891..569c3d2c4ef 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -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; } |