WL#10972: Add a variable cte_max_recursion_depth to limit recursion in CTE
Affects: Server-8.0 — Status: Complete
We should add a global and session variable cte_max_recursion_depth in 8.0: - default 1000 - when a recursive CTE does more than this number of iterations, stop and return informative error message This default is to protect the innocent user from making a runaway query if he forgets to add a WHERE to the recursive query block.
F1 - there should be a global and session variable cte_max_recursion_depth. F2 - default should be 1000; it can take values from 0 to 4G. F3 - when a recursive CTE does more than this number of iterations, MySQL should stop the query and return an informative error message.
Copyright (c) 2000, 2020, Oracle Corporation and/or its affiliates. All rights reserved.