Skip to content

MDEV-38405 Assertion `tbl->trn == 0' failed in _ma_set_trn_for_table#5119

Open
grooverdan wants to merge 1 commit into
MariaDB:10.6from
grooverdan:MDEV-38405
Open

MDEV-38405 Assertion `tbl->trn == 0' failed in _ma_set_trn_for_table#5119
grooverdan wants to merge 1 commit into
MariaDB:10.6from
grooverdan:MDEV-38405

Conversation

@grooverdan
Copy link
Copy Markdown
Member

Aria bulk insert operations disables share->now_transaction meaning a concurrent open of the stable table will have
tbl->trn == &dummy_transaction_object for its handler object during opening.

As the _ma_set_trn_for_table is setting the trn, its harmless if the current trn is the dummy_transaction_object.

Relax the assert to allow for this state.

Aria bulk insert operations disables share->now_transaction meaning
a concurrent open of the stable table will have
tbl->trn == &dummy_transaction_object for its handler object
during opening.

As the _ma_set_trn_for_table is setting the trn, its harmless
if the current trn is the dummy_transaction_object.

Relax the assert to allow for this state.
@grooverdan grooverdan requested a review from montywi May 25, 2026 01:31
@grooverdan grooverdan added the MariaDB Foundation Pull requests created by MariaDB Foundation label May 25, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the _ma_set_trn_for_table function in storage/maria/ma_trnman.h to relax a debug assertion. The update allows tbl->trn to be either null or equal to the dummy_transaction_object when assigning a new transaction, whereas the previous implementation strictly required it to be null. I have no feedback to provide as there were no review comments to evaluate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MariaDB Foundation Pull requests created by MariaDB Foundation

Development

Successfully merging this pull request may close these issues.

2 participants