summaryrefslogtreecommitdiff
path: root/storage/spider
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-08-20 15:24:13 +0300
committerSergey Vojtovich <svoj@mariadb.org>2015-08-21 10:40:51 +0400
commit1bae0d9e5669c2d03209082142e892417e24d09a (patch)
tree8702469bab1f515c78a06ede07ae4aeaa297c802 /storage/spider
parent31e365efae28ba3208e80511c4d18fe11a79541a (diff)
downloadmariadb-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 'storage/spider')
-rw-r--r--storage/spider/spd_sys_table.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/storage/spider/spd_sys_table.cc b/storage/spider/spd_sys_table.cc
index 7b996383f95..15d0c43a176 100644
--- a/storage/spider/spd_sys_table.cc
+++ b/storage/spider/spd_sys_table.cc
@@ -2390,7 +2390,7 @@ TABLE *spider_mk_sys_tmp_table(
goto error_alloc_field;
field->init(table);
- if (!(i_field = new Item_field(thd, (Field *) field)))
+ if (!(i_field = new (thd->mem_root) Item_field(thd, (Field *) field)))
goto error_alloc_item_field;
if (i_list.push_back(i_field))
@@ -2443,29 +2443,29 @@ TABLE *spider_mk_sys_tmp_table_for_result(
goto error_alloc_field1;
field1->init(table);
- if (!(i_field1 = new Item_field(thd, (Field *) field1)))
+ if (!(i_field1 = new (thd->mem_root) Item_field(thd, (Field *) field1)))
goto error_alloc_item_field1;
if (i_list.push_back(i_field1))
goto error_push_item1;
- if (!(field2 = new Field_blob(
+ if (!(field2 = new (thd->mem_root) Field_blob(
4294967295U, FALSE, field_name2, cs, TRUE)))
goto error_alloc_field2;
field2->init(table);
- if (!(i_field2 = new Item_field(thd, (Field *) field2)))
+ if (!(i_field2 = new (thd->mem_root) Item_field(thd, (Field *) field2)))
goto error_alloc_item_field2;
if (i_list.push_back(i_field2))
goto error_push_item2;
- if (!(field3 = new Field_blob(
+ if (!(field3 = new (thd->mem_root) Field_blob(
4294967295U, FALSE, field_name3, cs, TRUE)))
goto error_alloc_field3;
field3->init(table);
- if (!(i_field3 = new Item_field(thd, (Field *) field3)))
+ if (!(i_field3 = new (thd->mem_root) Item_field(thd, (Field *) field3)))
goto error_alloc_item_field3;
if (i_list.push_back(i_field3))