summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2020-12-14 21:03:07 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2020-12-18 12:54:33 +0530
commitdc1f28e78c22fde6a6446445a6574ab0dd7fcf93 (patch)
tree44493f3c88404faa4925660ca5a8ee1769d52eb4 /sql/item.cc
parentcc16977aa84edcca540fdef0db8af67479165aef (diff)
downloadmariadb-git-10.2-wf.tar.gz
MDEV-15296: wrong result with window function inside a subquery10.2-wf
Window Functions were treated as a constant in a dependent tables less subquery. Made sure that the behaviour of window functions is same as the aggregate function for dependent tables less subquery. Also propagted Item::with_window_func for few missing cases.
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 994d45a9dc3..9820ccc249a 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -8172,6 +8172,7 @@ Item_cache_wrapper::Item_cache_wrapper(THD *thd, Item *item_arg):
Type_std_attributes::set(orig_item);
maybe_null= orig_item->maybe_null;
with_sum_func= orig_item->with_sum_func;
+ with_window_func= orig_item->with_window_func;
with_param= orig_item->with_param;
with_field= orig_item->with_field;
name= item_arg->name;