diff options
author | Monty <monty@mariadb.org> | 2015-08-20 15:24:13 +0300 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-08-21 10:40:51 +0400 |
commit | 1bae0d9e5669c2d03209082142e892417e24d09a (patch) | |
tree | 8702469bab1f515c78a06ede07ae4aeaa297c802 /sql/item_create.cc | |
parent | 31e365efae28ba3208e80511c4d18fe11a79541a (diff) | |
download | mariadb-git-1bae0d9e5669c2d03209082142e892417e24d09a.tar.gz |
Stage 2 of MDEV-6152:
- Added mem_root to all calls to new Item
- Added private method operator new(size_t size) to Item to ensure that
we always use a mem_root when creating an item.
This saves use once call to current_thd per Item creation
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index e7bdc95a3dd..8c6d02623c6 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -5234,7 +5234,7 @@ Create_func_round::create_native(THD *thd, LEX_STRING name, case 1: { Item *param_1= item_list->pop(); - Item *i0 = new (thd->mem_root) Item_int(thd, (char*)"0", 0, 1); + Item *i0= new (thd->mem_root) Item_int(thd, (char*)"0", 0, 1); func= new (thd->mem_root) Item_func_round(thd, param_1, i0, 0); break; } @@ -6397,7 +6397,7 @@ Item *create_func_dyncol_delete(THD *thd, Item *str, List<Item> &nums) for (uint i= 0; (key= it++); i++) { dfs[i].key= key; - dfs[i].value= new Item_null(thd); + 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); |