mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
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.
This commit is contained in:
committed by
Sergei Golubchik
parent
52a25d7b67
commit
00ccff48af
@ -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))
|
||||
|
Reference in New Issue
Block a user