1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +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

@ -326,14 +326,14 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
DBUG_ENTER("mysql_admin_table");
DBUG_PRINT("enter", ("extra_open_options: %u", extra_open_options));
field_list.push_back(item = new Item_empty_string(thd, "Table",
field_list.push_back(item= new (thd->mem_root) Item_empty_string(thd, "Table",
NAME_CHAR_LEN * 2));
item->maybe_null = 1;
field_list.push_back(item = new Item_empty_string(thd, "Op", 10));
field_list.push_back(item= new (thd->mem_root) Item_empty_string(thd, "Op", 10));
item->maybe_null = 1;
field_list.push_back(item = new Item_empty_string(thd, "Msg_type", 10));
field_list.push_back(item= new (thd->mem_root) Item_empty_string(thd, "Msg_type", 10));
item->maybe_null = 1;
field_list.push_back(item = new Item_empty_string(thd, "Msg_text",
field_list.push_back(item= new (thd->mem_root) Item_empty_string(thd, "Msg_text",
SQL_ADMIN_MSG_TEXT_SIZE));
item->maybe_null = 1;
if (protocol->send_result_set_metadata(&field_list,