Skip to content

MDEV-38349 Fix assert thd->abort_on_warning == 0 in mysql_insert - #4715

Merged
grooverdan merged 1 commit into
MariaDB:11.8from
amodhakal:fix/mdev-38349
Mar 3, 2026
Merged

grooverdan merged 1 commit into
MariaDB:11.8from
amodhakal:fix/mdev-38349

Conversation

@amodhakal

Copy link
Copy Markdown
Contributor

When prepare_for_replace() fails, the code returned early via DBUG_RETURN(1), bypassing the abort label which resets thd->abort_on_warning to 0. This left the THD in a dirty state, triggering the dispatch_command assertion at end of command dispatch.

Meant to fix https://jira.mariadb.org/browse/MDEV-38349

@grooverdan grooverdan added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 2, 2026
@grooverdan

Copy link
Copy Markdown
Member

Thanks for the fix and clear description as to why this occurs.

Can you include the test case from the MDEV to the bottom of mysql-test/main/vector_innodb.test before '--echo # End of 11.8 tests' and mysql-test/mtr --record main.vector_innodb and then with both the vector_innodb.test and vector_innodb.result file (that changed from the record) git commit --amend with this change and git push --force to the same branch. This will update this PR.

Comment thread mysql-test/main/vector_innodb.test Resolved
@grooverdan
grooverdan self-requested a review March 2, 2026 05:23

@grooverdan grooverdan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Happy with this. Thanks for the quick fixes. I'm just waiting sure all of CI passes on this.

@gkodinov gkodinov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for your contribution. This is a preliminary review.

LGTM. And thanks to Daniel for reviewing this.

When prepare_for_replace() fails, the code returned early via
DBUG_RETURN(1), bypassing the abort label which resets
thd->abort_on_warning to 0. This left the THD in a dirty state,
triggering the dispatch_command assertion at end of command dispatch.

Signed-off-by: Amodh Dhakal <amodhakal@gmail.com>
@grooverdan
grooverdan enabled auto-merge (rebase) March 3, 2026 00:39
@grooverdan
grooverdan merged commit d477356 into MariaDB:11.8 Mar 3, 2026
17 of 18 checks passed
@grooverdan

Copy link
Copy Markdown
Member

Thank you @amodhakal ! This will be part of the next release.

@amodhakal
amodhakal deleted the fix/mdev-38349 branch August 23, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

3 participants