MDEV-32383 Server crashes in Item_func_match::init_search on 2nd execution of PS - #5614
Open
KhaledR57 wants to merge 1 commit into
Open
MDEV-32383 Server crashes in Item_func_match::init_search on 2nd execution of PS#5614KhaledR57 wants to merge 1 commit into
KhaledR57 wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item_func_match::masterpoints at an equal MATCH item that owns the sharedft_handler.setup_ftfuncs()sets it only when it is still unset, andcleanup()never reset it.A mergeable view is merged once. On re-execution
mysql_derived_prepare()returns early becauseTABLE_LIST::mergedis set, so the view's own MATCH item is never re-fixed and keeps the NULL table left bycleanup().init_ftfuncs()skips unfixed items inftfunc_list, butinit_search()follows master without that check and dereferenced the NULL table.Reset master in
cleanup(), after theft_handlerownership check that reads it, so the link is rebuilt from scratch on every execution.