1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03: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.
This commit is contained in:
Sergey Glukhov
2010-10-18 14:47:26 +04:00
parent ab3417b636
commit 9a8f22fa2d
5 changed files with 86 additions and 1 deletions

View File

@ -1713,6 +1713,9 @@ JOIN::reinit()
func->clear();
}
if (!(select_options & SELECT_DESCRIBE))
init_ftfuncs(thd, select_lex, test(order));
DBUG_RETURN(0);
}