Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
With a complex MATCH...AGAINST string, the call stack inside the server could look like this:
10.1 |
fts_ast_visit_sub_exp
|
fts_query_visitor
|
fts_ast_visit
|
fts_ast_visit
|
...
|
fts_ast_visit_sub_exp
|
fts_query_visitor
|
fts_ast_visit
|
fts_ast_visit
|
fts_ast_visit_sub_exp
|
fts_query_visitor
|
fts_ast_visit
|
fts_query
|
ha_innobase::ft_init_ext
|
Item_func_match::init_search
|
init_ftfuncs
|
JOIN::optimize_inner
|
JOIN::optimize
|
mysql_select
|
On my platform (GCC 10.2.0 -Og AMD64 debug build), the stack usage is 464 bytes for each fts_ast_visit_sub_exp(), and further 9,248 bytes from Item_func_match::init_search() to the first fts_ast_visit_sub_exp().
To prevent stack overflow, we should return an error if too deep recursion is encountered.
Attachments
Issue Links
- blocks
-
MDEV-23989 Merge new release of InnoDB 5.7.32 to 10.2
- Closed
-
MDEV-24004 2020 Q4 release merge
- Closed