diff options
author | Andrei Elkin <andrei.elkin@mariadb.com> | 2018-03-18 21:01:41 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-06-28 12:38:58 +0200 |
commit | 00ccff48af17d82c815909aaee170c59c9439675 (patch) | |
tree | 39cff161a6fd690e53c73f47f154684c5e8f1550 /sql/sql_repl.cc | |
parent | 52a25d7b674464013b7749a366b0879929985a1e (diff) | |
download | mariadb-git-00ccff48af17d82c815909aaee170c59c9439675.tar.gz |
MDEV-14014 Multi-Slave Replication Fail: bogus data in log event
MDEV-7257 made a dump thread to read from binlog concurrently with
writers as long as the read bytes are below a water-mark
(MYSQL_BIN_LOG::binlog_end_pos). However it appeared to be possible a
dump thread reader reach out for bytes past the water mark through a
feature of IO_CACHE that fills in the internal buffer and while doing
so it could read what the reader is not supposed to see (the bytes
above MYSQL_BIN_LOG::binlog_end_pos).
The issue is fixed with constraining the IO_CACHE buffer fill to respect
the watermark.
An added unit test proves reading from file is bound to an external
parameter
passed to {IO_CACHE::end_of_file} cache member.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 4ec70bf31da..35cdc98e0f4 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -2538,6 +2538,7 @@ static int send_events(binlog_send_info *info, IO_CACHE* log, LOG_INFO* linfo, linfo->pos= my_b_tell(log); info->last_pos= my_b_tell(log); + log->end_of_file= end_pos; while (linfo->pos < end_pos) { if (should_stop(info)) |