Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MariaDB Server SEGV on INSERT .. SELECT #3597

Open
wants to merge 2 commits into
base: 10.5
Choose a base branch
from

Conversation

Olernov
Copy link
Contributor

@Olernov Olernov commented Oct 26, 2024

  • The Jira issue number for this PR is: MDEV-26427

Description

This problem occured for statements like INSERT INTO t1 SELECT 1,
which do not have tables in the SELECT part. In such scenarios
SELECT_LEX::insert_tables was not properly set at setup_tables(),
and this led to either incorrect execution or a crash

This PR reverts the previous fix for MDEV-26427 and re-implements it.

Release Notes

How can this PR be tested?

TODO: modify the automated test suite to verify that the PR causes MariaDB to behave as intended.
Consult the documentation on "Writing good test cases".

If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

This reverts commit 49e1400
as it introduces regression MDEV-29935 and has to be reconsidered
in general
This problem occured for statements like `INSERT INTO t1 SELECT 1`,
which do not have tables in the SELECT part. In such scenarios
SELECT_LEX::insert_tables was not properly set at `setup_tables()`,
and this led to either incorrect execution or a crash
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