mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-15465 Server crash or ASAN heap-use-after-free in Item_func_match::cleanup upon using FT search with partitioning.
Partition engine FT keys are implemented in such a way that the FT function's cleanup() methods use table's internals. So calling them after close_thread_tables is unsafe.
This commit is contained in:
@ -8639,6 +8639,19 @@ int setup_ftfuncs(SELECT_LEX *select_lex)
|
||||
}
|
||||
|
||||
|
||||
void cleanup_ftfuncs(SELECT_LEX *select_lex)
|
||||
{
|
||||
List_iterator<Item_func_match> li(*(select_lex->ftfunc_list)),
|
||||
lj(*(select_lex->ftfunc_list));
|
||||
Item_func_match *ftf;
|
||||
|
||||
while ((ftf=li++))
|
||||
{
|
||||
ftf->cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int init_ftfuncs(THD *thd, SELECT_LEX *select_lex, bool no_order)
|
||||
{
|
||||
if (select_lex->ftfunc_list->elements)
|
||||
|
Reference in New Issue
Block a user