Skip to content

MDEV-32383 Server crashes in Item_func_match::init_search on 2nd execution of PS - #5614

Open
KhaledR57 wants to merge 1 commit into
10.11from
10.11-MDEV-32383
Open

MDEV-32383 Server crashes in Item_func_match::init_search on 2nd execution of PS#5614
KhaledR57 wants to merge 1 commit into
10.11from
10.11-MDEV-32383

Conversation

@KhaledR57

@KhaledR57 KhaledR57 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Item_func_match::master points at an equal MATCH item that owns the shared ft_handler. setup_ftfuncs() sets it only when it is still unset, and cleanup() never reset it.

A mergeable view is merged once. On re-execution mysql_derived_prepare() returns early because TABLE_LIST::merged is set, so the view's own MATCH item is never re-fixed and keeps the NULL table left by cleanup(). init_ftfuncs() skips unfixed items in ftfunc_list, but init_search() follows master without that check and dereferenced the NULL table.

Reset master in cleanup(), after the ft_handler ownership check that reads it, so the link is rebuilt from scratch on every execution.

…ution of PS

Item_func_match::master points at an equal MATCH item that owns the
shared ft_handler. setup_ftfuncs() sets it only when it is still unset,
and cleanup() never reset it.

A mergeable view is merged once. On re-execution mysql_derived_prepare()
returns early because TABLE_LIST::merged is set, so the view's own MATCH
item is never re-fixed and keeps the NULL table left by cleanup().
init_ftfuncs() skips unfixed items in ftfunc_list, but init_search()
follows master without that check and dereferenced the NULL table.

Reset master in cleanup(), after the ft_handler ownership check that
reads it, so the link is rebuilt from scratch on every execution.
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