mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
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
This commit is contained in:
parent
31e365efae
commit
1bae0d9e56
51 changed files with 1146 additions and 881 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue