-
Neha Kumari authored
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.
Neha Kumari authoredProblem: 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