summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 7ded4921180..c2725ed28cf 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -51,7 +51,7 @@ Item_sum::Item_sum(THD *thd, Item_sum &item):
else
if (!(args=(Item**) sql_alloc(sizeof(Item*)*arg_count)))
return;
- for(uint i= 0; i < arg_count; i++)
+ for (uint i= 0; i < arg_count; i++)
args[i]= item.args[i];
}
@@ -999,6 +999,10 @@ int dump_leaf(byte* key, uint32 count __attribute__((unused)),
Item_sum_count_distinct::~Item_sum_count_distinct()
{
+ /*
+ Free table and tree if they belong to this item (if item have not pointer
+ to original item from which was made copy => it own its objects )
+ */
if (!original)
{
if (table)