diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2020-12-14 21:03:07 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2020-12-18 12:54:33 +0530 |
commit | dc1f28e78c22fde6a6446445a6574ab0dd7fcf93 (patch) | |
tree | 44493f3c88404faa4925660ca5a8ee1769d52eb4 /sql/item_subselect.cc | |
parent | cc16977aa84edcca540fdef0db8af67479165aef (diff) | |
download | mariadb-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_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index a6d28a5c5c1..2fe601dadc9 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1138,6 +1138,7 @@ Item_singlerow_subselect::select_transformer(JOIN *join) !select_lex->table_list.elements && select_lex->item_list.elements == 1 && !select_lex->item_list.head()->with_sum_func && + !select_lex->item_list.head()->with_window_func && /* We can't change name of Item_field or Item_ref, because it will prevent its correct resolving, but we should save name of |