summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.cc
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2020-06-30 18:16:01 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2020-06-30 18:16:01 +0530
commit4a2e7b5368b2c78c5965b74727727053c67b406d (patch)
tree07819d050921640f8bec1d82f973f1ef3d9ac66c /sql/item_windowfunc.cc
parent17109001d6db712187ff2ccb43f6c18b01458318 (diff)
downloadmariadb-git-4a2e7b5368b2c78c5965b74727727053c67b406d.tar.gz
MDEV-22984: Throw an error when arguments to window functions are window functions
Window function is not allowed as arguments to window functions according to the standard.
Diffstat (limited to 'sql/item_windowfunc.cc')
-rw-r--r--sql/item_windowfunc.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc
index 7cb07af440b..a3edacd880e 100644
--- a/sql/item_windowfunc.cc
+++ b/sql/item_windowfunc.cc
@@ -237,6 +237,7 @@ bool Item_sum_hybrid_simple::fix_fields(THD *thd, Item **ref)
if ((!item->fixed && item->fix_fields(thd, args)) ||
(item= args[i])->check_cols(1))
return TRUE;
+ with_window_func|= item->with_window_func;
}
Type_std_attributes::set(args[0]);
for (uint i= 0; i < arg_count && !with_subselect; i++)