mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
Bug#54484 explain + prepared statement: crash and Got error -1 from storage engine
Subquery executes twice, at top level JOIN::optimize and ::execute stages. At first execution create_sort_index() function is called and FT_SELECT object is created and destroyed. HANDLER::ft_handler is cleaned up in the object destructor and at second execution FT_SELECT::get_next() method returns error. The fix is to reinit HANDLER::ft_handler field before re-execution of subquery. mysql-test/r/fulltext.result: test case mysql-test/t/fulltext.test: test case sql/item_func.cc: reinit ft_handler before re-execution of subquery sql/item_func.h: Fixed method name sql/sql_select.cc: reinit ft_handler before re-execution of subquery
This commit is contained in:
parent
e4fab954d1
commit
127c721cef
5 changed files with 86 additions and 1 deletions
|
|
@ -1531,7 +1531,7 @@ public:
|
|||
join_key(0), ft_handler(0), table(0), master(0), concat_ws(0) { }
|
||||
void cleanup()
|
||||
{
|
||||
DBUG_ENTER("Item_func_match");
|
||||
DBUG_ENTER("Item_func_match::cleanup");
|
||||
Item_real_func::cleanup();
|
||||
if (!master && ft_handler)
|
||||
ft_handler->please->close_search(ft_handler);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue