summaryrefslogtreecommitdiff
path: root/sql/item_row.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r--sql/item_row.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc
index 289efe45300..b65b0b7b608 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -95,7 +95,8 @@ void Item_row::split_sum_func(THD *thd, Item **ref_pointer_array,
else if ((*arg)->used_tables() || (*arg)->type() == SUM_FUNC_ITEM)
{
uint el= fields.elements;
- Item *new_item= new Item_ref(ref_pointer_array + el, 0, (*arg)->name);
+ Item *new_item= new Item_ref(ref_pointer_array + el, 0, (*arg)->name,
+ *arg);
fields.push_front(*arg);
ref_pointer_array[el]= *arg;
thd->change_item_tree(arg, new_item);