Skip to content

DRAFT | bug fix. - #5575

Open
pranavktiwari wants to merge 1 commit into
12.3from
bb-MDEV-38633-pranav
Open

DRAFT | bug fix.#5575
pranavktiwari wants to merge 1 commit into
12.3from
bb-MDEV-38633-pranav

Conversation

@pranavktiwari

@pranavktiwari pranavktiwari commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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

@pranavktiwari pranavktiwari changed the title bug fix. DRAFT | bug fix. Aug 20, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant