summaryrefslogtreecommitdiff
path: root/sql/events.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-08-24 14:42:07 +0300
committerMonty <monty@mariadb.org>2015-08-27 22:21:08 +0300
commit3cb578c001b2feabd2410f281d20eb6566371453 (patch)
tree4e3781e38f6531ea91ff127c024869c6b88c5849 /sql/events.cc
parentba340d8c47657774ba6d69bfc918dbebaaef6086 (diff)
downloadmariadb-git-3cb578c001b2feabd2410f281d20eb6566371453.tar.gz
MDEV-6152: Remove calls to current_thd while creating Item
- Part 3: Adding mem_root to push_back() and push_front() Other things: - Added THD as an argument to some partition functions. - Added memory overflow checking for XML tag's in read_xml()
Diffstat (limited to 'sql/events.cc')
-rw-r--r--sql/events.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/events.cc b/sql/events.cc
index a346d02fc39..2bb112867bf 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -640,35 +640,37 @@ send_show_create_event(THD *thd, Event_timed *et, Protocol *protocol)
DBUG_RETURN(TRUE);
field_list.push_back(new (mem_root)
- Item_empty_string(thd, "Event", NAME_CHAR_LEN));
+ Item_empty_string(thd, "Event", NAME_CHAR_LEN),
+ mem_root);
if (sql_mode_string_representation(thd, et->sql_mode, &sql_mode))
DBUG_RETURN(TRUE);
field_list.push_back(new (mem_root)
Item_empty_string(thd, "sql_mode",
- (uint) sql_mode.length));
+ (uint) sql_mode.length), mem_root);
tz_name= et->time_zone->get_name();
field_list.push_back(new (mem_root)
- Item_empty_string(thd, "time_zone", tz_name->length()));
+ Item_empty_string(thd, "time_zone", tz_name->length()),
+ mem_root);
field_list.push_back(new (mem_root)
Item_empty_string(thd, "Create Event",
- show_str.length()));
+ show_str.length()), mem_root);
field_list.push_back(new (mem_root)
Item_empty_string(thd, "character_set_client",
- MY_CS_NAME_SIZE));
+ MY_CS_NAME_SIZE), mem_root);
field_list.push_back(new (mem_root)
Item_empty_string(thd, "collation_connection",
- MY_CS_NAME_SIZE));
+ MY_CS_NAME_SIZE), mem_root);
field_list.push_back(new (mem_root)
Item_empty_string(thd, "Database Collation",
- MY_CS_NAME_SIZE));
+ MY_CS_NAME_SIZE), mem_root);
if (protocol->send_result_set_metadata(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))