mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-15894 Error, while using aggregated functions/window functions in anchor part
Usage of aggregate/window functions in non-recursive parts of recursive CTEs is allowed. Error messages complaining about this were reported by mistake.
This commit is contained in:
@@ -1173,7 +1173,7 @@ bool st_select_lex::check_unrestricted_recursive(bool only_standard_compliant)
|
||||
|
||||
|
||||
/* Check conditions 3-4 for restricted specification*/
|
||||
if (with_sum_func ||
|
||||
if ((with_sum_func && !with_elem->is_anchor(this)) ||
|
||||
(with_elem->contains_sq_with_recursive_reference()))
|
||||
with_elem->get_owner()->add_unrestricted(
|
||||
with_elem->get_mutually_recursive());
|
||||
|
||||
Reference in New Issue
Block a user