Skip to content

MDEV-40237: Partition info nullptr dereference#5366

Open
grooverdan wants to merge 1 commit into
MariaDB:11.4from
grooverdan:MDEV-40237
Open

MDEV-40237: Partition info nullptr dereference#5366
grooverdan wants to merge 1 commit into
MariaDB:11.4from
grooverdan:MDEV-40237

Conversation

@grooverdan

Copy link
Copy Markdown
Member

thd->lex is null in InnoDB purge thd. The Item_field can take a NULL context as a pointer for resolving field names.

@grooverdan grooverdan requested a review from midenok July 9, 2026 08:17
@grooverdan grooverdan changed the title MDEV-40237: Parition info nullptr dereference MDEV-40237: Partition info nullptr dereference Jul 9, 2026

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

Copy link
Copy Markdown
Contributor

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 introduces a null check for thd->lex when initializing the name resolution context in partition_info::vers_fix_field_list. The review feedback correctly identifies that thd->lex->current_select could also be null, which would still result in a null pointer dereference. It is recommended to update the check to ensure both pointers are valid before accessing the context.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread sql/partition_info.h Outdated
thd->lex is null in InnoDB purge thd. The Item_field
can take a NULL context as a pointer for resolving
field names.
@CLAassistant

CLAassistant commented Jul 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@grooverdan grooverdan changed the base branch from 11.8 to 11.4 July 10, 2026 02:39
@gkodinov gkodinov added the MariaDB Foundation Pull requests created by MariaDB Foundation label Jul 10, 2026
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.

3 participants