mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02: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:
parent
e34d3184fd
commit
1d98333ad9
3 changed files with 39 additions and 1 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue