• Luis Soares's avatar
    BUG#54842: DROP TEMPORARY TABLE not binlogged after manual · bf261cdb
    Luis Soares authored
    switching binlog format to ROW
    
    BUG 52616 fixed the case which the user would switch from STMT to
    ROW binlog format, but the server would silently ignore it. After
    that fix thd->is_current_stmt_binlog_format_row() reports correct
    value at logging time and events are logged in ROW (as expected)
    instead of STMT as they were previously and wrongly logged.
    
    However, the fix was only partially complete, because on
    disconnect, at THD cleanup, the implicit logging of temporary
    tables is conditionally performed. If the binlog_format==ROW and
    thd->is_current_stmt_binlog_format_row() is true then DROPs are
    not logged. Given that the user can switch from STMT to ROW, this
    is wrong because the server cannot tell, just by relying on the
    ROW binlog format, that the tables have been dropped before. This
    is effectively similar to the MIXED scenario when a switch from
    STMT to ROW is triggered.
    
    We fix this by removing this condition from
    close_temporary_tables.
    bf261cdb
binlog_row_mix_innodb_myisam.result 31.9 KB