summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-08-24 14:42:07 +0300
committerMonty <monty@mariadb.org>2015-08-27 22:21:08 +0300
commit3cb578c001b2feabd2410f281d20eb6566371453 (patch)
tree4e3781e38f6531ea91ff127c024869c6b88c5849 /sql/item_sum.cc
parentba340d8c47657774ba6d69bfc918dbebaaef6086 (diff)
downloadmariadb-git-3cb578c001b2feabd2410f281d20eb6566371453.tar.gz
MDEV-6152: Remove calls to current_thd while creating Item
- Part 3: Adding mem_root to push_back() and push_front() Other things: - Added THD as an argument to some partition functions. - Added memory overflow checking for XML tag's in read_xml()
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index e20b47c67d6..0eff2b6cec9 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -272,7 +272,7 @@ bool Item_sum::check_sum_func(THD *thd, Item **ref)
Let upper function decide whether this field is a non
aggregated one.
*/
- in_sum_func->outer_fields.push_back(field);
+ in_sum_func->outer_fields.push_back(field, thd->mem_root);
}
else
sel->set_non_agg_field_used(true);
@@ -777,7 +777,7 @@ bool Aggregator_distinct::setup(THD *thd)
for (uint i=0; i < item_sum->get_arg_count() ; i++)
{
Item *item=item_sum->get_arg(i);
- if (list.push_back(item))
+ if (list.push_back(item, thd->mem_root))
return TRUE; // End of memory
if (item->const_item() && item->is_null())
always_null= true;
@@ -898,7 +898,7 @@ bool Aggregator_distinct::setup(THD *thd)
PS/SP. Hence all further allocations are performed in the runtime
mem_root.
*/
- if (field_list.push_back(&field_def))
+ if (field_list.push_back(&field_def, thd->mem_root))
DBUG_RETURN(TRUE);
item_sum->null_value= item_sum->maybe_null= 1;
@@ -3505,7 +3505,7 @@ bool Item_func_group_concat::setup(THD *thd)
for (uint i= 0; i < arg_count_field; i++)
{
Item *item= args[i];
- if (list.push_back(item))
+ if (list.push_back(item, thd->mem_root))
DBUG_RETURN(TRUE);
if (item->const_item())
{