mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
fixed memory leak
sql/item_sum.h: fixed initialization
This commit is contained in:
@@ -1232,6 +1232,8 @@ bool Item_sum_count_distinct::setup(THD *thd)
|
||||
}
|
||||
}
|
||||
|
||||
if (use_tree)
|
||||
delete_tree(tree);
|
||||
init_tree(tree, min(thd->variables.max_heap_table_size,
|
||||
thd->variables.sortbuff_size/16), 0,
|
||||
key_length, compare_key, 0, NULL, cmp_arg);
|
||||
@@ -1850,6 +1852,9 @@ bool Item_func_group_concat::setup(THD *thd)
|
||||
}
|
||||
rec_offset = table->reclength - key_length;
|
||||
|
||||
|
||||
if (tree_mode)
|
||||
delete_tree(tree);
|
||||
/*
|
||||
choise function of sort
|
||||
*/
|
||||
|
||||
@@ -691,7 +691,7 @@ class Item_func_group_concat : public Item_sum
|
||||
warning_available(item.warning_available),
|
||||
key_length(item.key_length),
|
||||
rec_offset(item.rec_offset),
|
||||
tree_mode(0),
|
||||
tree_mode(item.tree_mode),
|
||||
distinct(item.distinct),
|
||||
warning_for_row(item.warning_for_row),
|
||||
separator(item.separator),
|
||||
@@ -707,7 +707,7 @@ class Item_func_group_concat : public Item_sum
|
||||
count_cut_values(item.count_cut_values),
|
||||
original(&item)
|
||||
{
|
||||
quick_group = 0;
|
||||
quick_group= item.quick_group;
|
||||
};
|
||||
~Item_func_group_concat();
|
||||
enum Sumfunctype sum_func () const {return GROUP_CONCAT_FUNC;}
|
||||
|
||||
Reference in New Issue
Block a user