summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.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/repl_failsafe.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/repl_failsafe.cc')
-rw-r--r--sql/repl_failsafe.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index 3c99becf304..1c7c8c013ea 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -232,16 +232,16 @@ bool show_slave_hosts(THD* thd)
Protocol *protocol= thd->protocol;
DBUG_ENTER("show_slave_hosts");
- field_list.push_back(new Item_return_int("Server_id", 10,
+ field_list.push_back(new Item_return_int(thd, "Server_id", 10,
MYSQL_TYPE_LONG));
- field_list.push_back(new Item_empty_string("Host", 20));
+ field_list.push_back(new Item_empty_string(thd, "Host", 20));
if (opt_show_slave_auth_info)
{
- field_list.push_back(new Item_empty_string("User",20));
- field_list.push_back(new Item_empty_string("Password",20));
+ 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 Item_return_int("Port", 7, MYSQL_TYPE_LONG));
- field_list.push_back(new Item_return_int("Master_id", 10,
+ 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,
MYSQL_TYPE_LONG));
if (protocol->send_result_set_metadata(&field_list,