mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed bug mdev-12375.
The function st_select_lex_unit::exec_recursive() incorrectly determined that a CTE mutually recursive with some others was stabilized in the case when the non-recursive part of the CTE returned an empty set. As a result the server fell into an infinite loop when executing a query using this CTE.
This commit is contained in:
@ -1247,7 +1247,7 @@ bool st_select_lex_unit::exec_recursive()
|
||||
thd->inc_examined_row_count(examined_rows);
|
||||
|
||||
incr_table->file->info(HA_STATUS_VARIABLE);
|
||||
if (incr_table->file->stats.records == 0)
|
||||
if (with_element->level && incr_table->file->stats.records == 0)
|
||||
with_element->set_as_stabilized();
|
||||
else
|
||||
with_element->level++;
|
||||
|
Reference in New Issue
Block a user