1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +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

@@ -814,13 +814,15 @@ const LEX_STRING warning_level_names[]=
bool mysqld_show_warnings(THD *thd, ulong levels_to_show)
{
List<Item> field_list;
MEM_ROOT *mem_root= thd->mem_root;
DBUG_ENTER("mysqld_show_warnings");
DBUG_ASSERT(thd->get_stmt_da()->is_warning_info_read_only());
field_list.push_back(new Item_empty_string(thd, "Level", 7));
field_list.push_back(new Item_return_int(thd, "Code", 4, MYSQL_TYPE_LONG));
field_list.push_back(new Item_empty_string(thd, "Message",
field_list.push_back(new (mem_root) Item_empty_string(thd, "Level", 7));
field_list.push_back(new (mem_root) Item_return_int(thd, "Code", 4,
MYSQL_TYPE_LONG));
field_list.push_back(new (mem_root) Item_empty_string(thd, "Message",
MYSQL_ERRMSG_SIZE));
if (thd->protocol->send_result_set_metadata(&field_list,