1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03: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:
Monty
2015-08-20 15:24:13 +03:00
committed by Sergey Vojtovich
parent 31e365efae
commit 1bae0d9e56
51 changed files with 1146 additions and 881 deletions

View File

@@ -9626,9 +9626,9 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
*/
DBUG_ASSERT(! thd->in_sub_stmt);
field_list.push_back(item = new Item_empty_string(thd, "Table", NAME_LEN*2));
field_list.push_back(item= new (thd->mem_root) Item_empty_string(thd, "Table", NAME_LEN*2));
item->maybe_null= 1;
field_list.push_back(item= new Item_int(thd, "Checksum",
field_list.push_back(item= new (thd->mem_root) Item_int(thd, "Checksum",
(longlong) 1,
MY_INT64_NUM_DECIMAL_DIGITS));
item->maybe_null= 1;