Skip to content

Conversation

@bsrikanth-mariadb
Copy link
Contributor

When the optimizer_max_sel_arg_weight is set to 1, a nested query crashed while tracing.

SEL_ARG object has a field named 'field', that is not set when the type is other than KEY_RANGE. But, the field was accessed to store its name, and weight to the trace. This resulted in a crash due to NULL pointer.

Added a check to access field if the type is KEY_RANGE, and if not, just trace the type.

When the optimizer_max_sel_arg_weight is set to 1, a nested query
crashed while tracing.

SEL_ARG object has a field named 'field', that is not set when the
type is other than KEY_RANGE. But, the field was accessed to store
its name, and weight to the trace. This resulted in a crash due to NULL
pointer.

Added a check to access field if the type is KEY_RANGE, and if not, just
trace the type.
@bsrikanth-mariadb bsrikanth-mariadb force-pushed the 11.4-MDEV-37510-crash_with_optimizer_max_sel_arg_weight_equal_1 branch from 426c6e5 to 6fd75f1 Compare January 1, 2026 02:21
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.

2 participants