summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-08-11 11:18:38 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-08-21 10:40:39 +0400
commit31e365efae28ba3208e80511c4d18fe11a79541a (patch)
treef249682cc42490fc86382f5244a051001dc13c9e /sql/sql_admin.cc
parent4374da63f03abc472f68f42e4e93261a18bfe417 (diff)
downloadmariadb-git-31e365efae28ba3208e80511c4d18fe11a79541a.tar.gz
MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)
Added mandatory thd parameter to Item (and all derivative classes) constructor. Added thd parameter to all routines that may create items. Also removed "current_thd" from Item::Item. This reduced number of pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r--sql/sql_admin.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index d917bd69f72..4f78b1785a5 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -326,13 +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("Table", NAME_CHAR_LEN*2));
+ field_list.push_back(item = new Item_empty_string(thd, "Table",
+ NAME_CHAR_LEN * 2));
item->maybe_null = 1;
- field_list.push_back(item = new Item_empty_string("Op", 10));
+ field_list.push_back(item = new Item_empty_string(thd, "Op", 10));
item->maybe_null = 1;
- field_list.push_back(item = new Item_empty_string("Msg_type", 10));
+ field_list.push_back(item = new Item_empty_string(thd, "Msg_type", 10));
item->maybe_null = 1;
- field_list.push_back(item = new Item_empty_string("Msg_text",
+ field_list.push_back(item = new Item_empty_string(thd, "Msg_text",
SQL_ADMIN_MSG_TEXT_SIZE));
item->maybe_null = 1;
if (protocol->send_result_set_metadata(&field_list,