Commit 3613f8c2 authored by serg@serg.mylan's avatar serg@serg.mylan

sql/log.cc

    don't set LOG_EVENT_BINLOG_IN_USE_F for relay logs
sql/sql_repl.cc
    clear LOG_EVENT_BINLOG_IN_USE_F flag before sending an event to a slave
parent dba1e088
......@@ -613,6 +613,11 @@ bool MYSQL_LOG::open(const char *log_name,
even if this is not the very first binlog.
*/
Format_description_log_event s(BINLOG_VERSION);
/*
don't set LOG_EVENT_BINLOG_IN_USE_F for SEQ_READ_APPEND io_cache
as we won't be able to reset it later
*/
if (io_cache_type == WRITE_CACHE)
s.flags|= LOG_EVENT_BINLOG_IN_USE_F;
if (!s.is_valid())
goto err;
......
......@@ -456,6 +456,7 @@ impossible position";
{
binlog_can_be_corrupted= test((*packet)[FLAGS_OFFSET+1] &
LOG_EVENT_BINLOG_IN_USE_F);
(*packet)[FLAGS_OFFSET+1] &= ~LOG_EVENT_BINLOG_IN_USE_F;
/*
mark that this event with "log_pos=0", so the slave
should not increment master's binlog position
......@@ -512,8 +513,11 @@ impossible position";
#endif
if ((*packet)[EVENT_TYPE_OFFSET+1] == FORMAT_DESCRIPTION_EVENT)
{
binlog_can_be_corrupted= test((*packet)[FLAGS_OFFSET+1] &
LOG_EVENT_BINLOG_IN_USE_F);
(*packet)[FLAGS_OFFSET+1] &= ~LOG_EVENT_BINLOG_IN_USE_F;
}
else if ((*packet)[EVENT_TYPE_OFFSET+1] == STOP_EVENT)
binlog_can_be_corrupted= FALSE;
......
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