summaryrefslogtreecommitdiff
path: root/sql/item_create.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_create.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_create.cc')
-rw-r--r--sql/item_create.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 8c6d02623c6..3d7c4eede93 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -6349,8 +6349,8 @@ static List<Item> *create_func_dyncol_prepare(THD *thd,
for (uint i= 0; (def= li++) ;)
{
dfs[0][i++]= *def;
- args->push_back(def->key);
- args->push_back(def->value);
+ args->push_back(def->key, thd->mem_root);
+ args->push_back(def->value, thd->mem_root);
}
return args;
}
@@ -6374,7 +6374,7 @@ Item *create_func_dyncol_add(THD *thd, Item *str,
if (!(args= create_func_dyncol_prepare(thd, &dfs, list)))
return NULL;
- args->push_back(str);
+ args->push_back(str, thd->mem_root);
return new (thd->mem_root) Item_func_dyncol_add(thd, *args, dfs);
}
@@ -6399,11 +6399,11 @@ Item *create_func_dyncol_delete(THD *thd, Item *str, List<Item> &nums)
dfs[i].key= key;
dfs[i].value= new (thd->mem_root) Item_null(thd);
dfs[i].type= DYN_COL_INT;
- args->push_back(dfs[i].key);
- args->push_back(dfs[i].value);
+ args->push_back(dfs[i].key, thd->mem_root);
+ args->push_back(dfs[i].value, thd->mem_root);
}
- args->push_back(str);
+ args->push_back(str, thd->mem_root);
return new (thd->mem_root) Item_func_dyncol_add(thd, *args, dfs);
}