• Luis Soares's avatar
    BUG#43046: mixed mode switch to row format with temp table lead · 6b2c3ff5
    Luis Soares authored
               to wrong result
          
    When using MIXED mode and issuing 'CREATE TEMPORARY TABLE t_tmp',
    the statement is logged if the current binlogging mode is
    STATEMENT. This causes the slave to replay the instruction and
    create the temporary table as well. If there is no switch to ROW
    mode, and later on a 'DROP TEMPORARY TABLE t_tmp' is issued, then
    this statement will also be logged and the slave will
    remove/close the temporary table.
          
    However, if there is a switch to ROW mode between the CREATE and
    DROP TEMPORARY table, the DROP statement will not be logged,
    leaving the slave with a dangling temporary table.
          
    This patch addresses this, by always logging a DROP TEMPORARY
    TABLE IF EXISTS when in mixed mode and a drop statement is issued
    for temporary table(s).
    6b2c3ff5
rpl_temp_table_mix_row.test 4.45 KB