1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-31214 Recursive CTE execution is interrupted without errors or warnings

This commit is contained in:
Sergei Golubchik
2023-06-30 21:03:29 +02:00
parent 22e5a5ff6e
commit 5c81c50f10
2 changed files with 11 additions and 0 deletions

View File

@ -1142,7 +1142,14 @@ bool TABLE_LIST::fill_recursive(THD *thd)
while (!rc && !with->all_are_stabilized())
{
if (with->level > thd->variables.max_recursive_iterations)
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_QUERY_RESULT_INCOMPLETE,
ER_THD(thd, ER_QUERY_RESULT_INCOMPLETE),
"max_recursive_iterations =",
(ulonglong)thd->variables.max_recursive_iterations);
break;
}
with->prepare_for_next_iteration();
rc= unit->exec_recursive();
}