DRAFT | bug fix. - #5575
Open
pranavktiwari wants to merge 1 commit into
Open
Conversation
pranavktiwari
force-pushed
the
bb-MDEV-38633-pranav
branch
from
August 20, 2026 11:31
e4f3511 to
116b83a
Compare
A failing multi-table UPDATE or DELETE marked every target temporary table as not up to date in the binary log, even when nothing had been changed. Any later statement reading such a table was then forced to use row logging. Only mark the tables when something was actually changed—that is, when rows were updated/deleted or a non-transactional table was modified. If nothing changed, set THD::tmp_table_binlog_handled so that mark_tmp_table_as_free_for_reuse() does not mark them either.
pranavktiwari
force-pushed
the
bb-MDEV-38633-pranav
branch
from
August 20, 2026 12:21
116b83a to
a04fd00
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes MDEV-38633
Problem:
Temporary tables could retain an incorrect binlog state after an error was already handled in send_eof(). This could cause subsequent use of the temporary tables to incorrectly treat them as completely binlogged.
Cause:
multi_update::abort_result_set() skips the error handling and binlogging logic when error_handled is set, but the temporary-table binlog state must still be reset. The existing control flow did not correctly reset that state in the error_handled path.
Fix:
1- multi_update::abort_result_set() resets the binlog state
2- Added the same logic for multi_delete::abort_result_set() resets the binlog state