diff options
author | Monty <monty@mariadb.org> | 2015-08-20 15:24:13 +0300 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-08-21 10:40:51 +0400 |
commit | 1bae0d9e5669c2d03209082142e892417e24d09a (patch) | |
tree | 8702469bab1f515c78a06ede07ae4aeaa297c802 /sql/sql_admin.cc | |
parent | 31e365efae28ba3208e80511c4d18fe11a79541a (diff) | |
download | mariadb-git-1bae0d9e5669c2d03209082142e892417e24d09a.tar.gz |
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
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r-- | sql/sql_admin.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 4f78b1785a5..f8f5809d9c2 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -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, |