• Luis Soares's avatar
    BUG#34582: FLUSH LOGS does not close and reopen the binlog index · 6395cb8e
    Luis Soares authored
    file
          
    Issuing 'FLUSH LOGS' does not close and reopen indexfile.
    Instead a SEEK_SET is performed.
          
    This patch makes index file to be closed and reopened whenever a
    rotation happens (FLUSH LOGS is issued or binary log exceeds 
    maximum configured size).
    
    mysql-test/suite/binlog/r/binlog_delete_and_flush_index.result:
      Result file.
    mysql-test/suite/binlog/t/binlog_delete_and_flush_index.test:
      Test case.
    sql/log.cc:
      Added LOG_CLOSE_INDEX flag when calling MYSQL_BIN_LOG::close
      from within MYSQL_BIN_LOG::new_file_impl (which should just be
      called whenever a rotation is to happen - FLUSH LOGS issued or
      binlog size exceeds the maximum configured).
    6395cb8e
binlog_delete_and_flush_index.test 3.49 KB