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.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc
index 0c7eae9d920..62f31186b09 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -95,6 +95,7 @@ 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;
+ ref_pointer_array[el]=*arg;
Item *new_item= new Item_ref(ref_pointer_array + el, 0, (*arg)->name);
fields.push_front(*arg);
ref_pointer_array[el]= *arg;