summaryrefslogtreecommitdiff
path: root/sql/sql_window.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-05 16:51:26 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-05 16:51:26 +0300
commit680463a8d991389f4ea5942e87764137c55c0eb4 (patch)
tree427f8946aa9085c7f6346e1047144995cb7c459e /sql/sql_window.cc
parent05693cf2149f8792863a32325090e789015286fc (diff)
parentefc70da5fd0459ff44153529d13651741cc32bc4 (diff)
downloadmariadb-git-680463a8d991389f4ea5942e87764137c55c0eb4.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_window.cc')
-rw-r--r--sql/sql_window.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_window.cc b/sql/sql_window.cc
index 7e319c96000..35f5a83608c 100644
--- a/sql/sql_window.cc
+++ b/sql/sql_window.cc
@@ -3058,7 +3058,8 @@ bool Window_funcs_sort::setup(THD *thd, SQL_SELECT *sel,
*/
ORDER *order= (ORDER *)alloc_root(thd->mem_root, sizeof(ORDER));
memset(order, 0, sizeof(*order));
- Item *item= new (thd->mem_root) Item_field(thd, join_tab->table->field[0]);
+ Item *item= new (thd->mem_root) Item_temptable_field(thd,
+ join_tab->table->field[0]);
order->item= (Item **)alloc_root(thd->mem_root, 2 * sizeof(Item *));
order->item[1]= NULL;
order->item[0]= item;