• Kristian Nielsen's avatar
    MDEV-6403: Temporary tables lost at STOP SLAVE in GTID mode if master has not... · 78c74dbe
    Kristian Nielsen authored
    MDEV-6403: Temporary tables lost at STOP SLAVE in GTID mode if master has not rotated binlog since restart
    
    The binlog contains specially marked format description events to mark
    when a master restart happened (which could have caused temporary
    tables to be silently dropped). Such events also cause slave to close
    temporary tables.
    
    However, there was a bug that if after this, slave re-connects to the
    master in GTID mode, the master can send an old format description
    event again. If temporary tables are closed when such event is seen
    for the second time, it might drop temporary tables created after that
    event, and cause replication failure.
    
    With this patch, the restart flag of the format description event is
    cleared by the master when it is sent to the slave in a subsequent
    connection, to avoid the errorneous temp table close.
    78c74dbe
sql_repl.cc 134 KB