Skip to content

MDEV-40837: Crash while recording context when character_set_result is NULL - #5732

Closed
bsrikanth-mariadb wants to merge 1 commit into
mainfrom
13.2-MDEV-40837-record-ctx-crash-when-character_set_results-is-null
Closed

bsrikanth-mariadb wants to merge 1 commit into
mainfrom
13.2-MDEV-40837-record-ctx-crash-when-character_set_results-is-null

Conversation

@bsrikanth-mariadb

Copy link
Copy Markdown
Contributor

The value of character_set_results can be set to null unlike character_set_client, or collation_connection.
When recording context for a query in opt_context_store_replay.cc, character_set_results->cs_name was accessed, without checking if character_set_results value was null or not. Hence the crash.

The solution is to add a null check for the variable character_set_results, before accessing cs_name, inside Optimizer_context_recorder::dump_sql_script().

…is NULL

The value of character_set_results can be set to null unlike
character_set_client, or collation_connection.
When recording context for a query in opt_context_store_replay.cc,
character_set_results->cs_name was accessed, without checking if
character_set_results value was null or not. Hence the crash.

The solution is to add a null check for the variable character_set_results,
before accessing cs_name, inside Optimizer_context_recorder::dump_sql_script().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant