summaryrefslogtreecommitdiff
path: root/sql/events.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/events.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/events.cc')
-rw-r--r--sql/events.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/events.cc b/sql/events.cc
index d1cbd297809..911a683b723 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -639,29 +639,30 @@ send_show_create_event(THD *thd, Event_timed *et, Protocol *protocol)
if (et->get_create_event(thd, &show_str))
DBUG_RETURN(TRUE);
- field_list.push_back(new Item_empty_string("Event", NAME_CHAR_LEN));
+ field_list.push_back(new Item_empty_string(thd, "Event", NAME_CHAR_LEN));
if (sql_mode_string_representation(thd, et->sql_mode, &sql_mode))
DBUG_RETURN(TRUE);
- field_list.push_back(new Item_empty_string("sql_mode", (uint) sql_mode.length));
+ field_list.push_back(new Item_empty_string(thd, "sql_mode",
+ (uint) sql_mode.length));
tz_name= et->time_zone->get_name();
- field_list.push_back(new Item_empty_string("time_zone",
+ field_list.push_back(new Item_empty_string(thd, "time_zone",
tz_name->length()));
- field_list.push_back(new Item_empty_string("Create Event",
+ field_list.push_back(new Item_empty_string(thd, "Create Event",
show_str.length()));
field_list.push_back(
- new Item_empty_string("character_set_client", MY_CS_NAME_SIZE));
+ new Item_empty_string(thd, "character_set_client", MY_CS_NAME_SIZE));
field_list.push_back(
- new Item_empty_string("collation_connection", MY_CS_NAME_SIZE));
+ new Item_empty_string(thd, "collation_connection", MY_CS_NAME_SIZE));
field_list.push_back(
- new Item_empty_string("Database Collation", MY_CS_NAME_SIZE));
+ new Item_empty_string(thd, "Database Collation", MY_CS_NAME_SIZE));
if (protocol->send_result_set_metadata(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))