Commit 72ae2a58 authored by unknown's avatar unknown
Browse files

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


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 ebbee9d9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;
+4 −0
Original line number Diff line number Diff line
@@ -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;