diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2020-08-06 17:50:20 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2020-08-06 18:01:00 +0530 |
commit | caa474f8e3139b1d8d00be7bedf337af7fd304a3 (patch) | |
tree | ba34a9f8dfcdd7becb4b073a64797a96d6c61c64 /sql/item_windowfunc.cc | |
parent | 1e31d74833d56609f8711022394c1eb2eb25a19a (diff) | |
download | mariadb-git-caa474f8e3139b1d8d00be7bedf337af7fd304a3.tar.gz |
MDEV-15180: server crashed with NTH_VALUE()
fix_fields for the arguments of the NTH_VALUE function was updating the same reference,
so for the second argument (or after the first argument) the items were not resolved
to their corresponding field from the view as they were updating the reference to the
first argument.
Diffstat (limited to 'sql/item_windowfunc.cc')
-rw-r--r-- | sql/item_windowfunc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc index 87dddbfb439..bb4a8a9f3af 100644 --- a/sql/item_windowfunc.cc +++ b/sql/item_windowfunc.cc @@ -234,7 +234,7 @@ bool Item_sum_hybrid_simple::fix_fields(THD *thd, Item **ref) { Item *item= args[i]; // 'item' can be changed during fix_fields - if ((!item->fixed && item->fix_fields(thd, args)) || + if ((!item->fixed && item->fix_fields(thd, args + i)) || (item= args[i])->check_cols(1)) return TRUE; with_window_func|= item->with_window_func; |