Skip to content
  • Neha Kumari's avatar
    9827f139
    Bug#28606948: BACKPORT OF BUG#24670909 TO 5.7.22 · 9827f139
    Neha Kumari authored
    Backported the changes from mysql-8.0 to mysql-5.7
    
    BUG#24670909:
    
    Problem:
    Previously, a session disconnect causes DROP TEMPORARY TABLE IF EXISTS
    to be binlogged for all the opened temp tables in that session. Even
    though temporary table operation are not otherwise binlogged in row or
    mixed mode, this was done regardless of binary log format in use, as
    it was not tracked, whether a particular temp table was not created in
    STATEMENT mode - in which case it does need the DROP.
    For ROW/MIXED users, this behavior causes spurious binlog writes
    and GTIDs generated on otherwise read only servers.
    
    Fix:
    Track the binlog format at temporary table create time
    (open_table_uncached and after final decide_logging_format call for
    CREATE ... SELECT), and that can be used to decide whether a DROP should be
    logged or not in method close_temporary_tables.
    9827f139
    Bug#28606948: BACKPORT OF BUG#24670909 TO 5.7.22
    Neha Kumari authored
    Backported the changes from mysql-8.0 to mysql-5.7
    
    BUG#24670909:
    
    Problem:
    Previously, a session disconnect causes DROP TEMPORARY TABLE IF EXISTS
    to be binlogged for all the opened temp tables in that session. Even
    though temporary table operation are not otherwise binlogged in row or
    mixed mode, this was done regardless of binary log format in use, as
    it was not tracked, whether a particular temp table was not created in
    STATEMENT mode - in which case it does need the DROP.
    For ROW/MIXED users, this behavior causes spurious binlog writes
    and GTIDs generated on otherwise read only servers.
    
    Fix:
    Track the binlog format at temporary table create time
    (open_table_uncached and after final decide_logging_format call for
    CREATE ... SELECT), and that can be used to decide whether a DROP should be
    logged or not in method close_temporary_tables.
Loading