mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -230,18 +230,19 @@ bool show_slave_hosts(THD* thd)
|
||||
{
|
||||
List<Item> field_list;
|
||||
Protocol *protocol= thd->protocol;
|
||||
MEM_ROOT *mem_root= thd->mem_root;
|
||||
DBUG_ENTER("show_slave_hosts");
|
||||
|
||||
field_list.push_back(new Item_return_int(thd, "Server_id", 10,
|
||||
field_list.push_back(new (mem_root) Item_return_int(thd, "Server_id", 10,
|
||||
MYSQL_TYPE_LONG));
|
||||
field_list.push_back(new Item_empty_string(thd, "Host", 20));
|
||||
field_list.push_back(new (mem_root) Item_empty_string(thd, "Host", 20));
|
||||
if (opt_show_slave_auth_info)
|
||||
{
|
||||
field_list.push_back(new Item_empty_string(thd, "User", 20));
|
||||
field_list.push_back(new Item_empty_string(thd, "Password", 20));
|
||||
field_list.push_back(new (mem_root) Item_empty_string(thd, "User", 20));
|
||||
field_list.push_back(new (mem_root) Item_empty_string(thd, "Password", 20));
|
||||
}
|
||||
field_list.push_back(new Item_return_int(thd, "Port", 7, MYSQL_TYPE_LONG));
|
||||
field_list.push_back(new Item_return_int(thd, "Master_id", 10,
|
||||
field_list.push_back(new (mem_root) Item_return_int(thd, "Port", 7, MYSQL_TYPE_LONG));
|
||||
field_list.push_back(new (mem_root) Item_return_int(thd, "Master_id", 10,
|
||||
MYSQL_TYPE_LONG));
|
||||
|
||||
if (protocol->send_result_set_metadata(&field_list,
|
||||
|
Reference in New Issue
Block a user