From 3cb578c001b2feabd2410f281d20eb6566371453 Mon Sep 17 00:00:00 2001 From: Monty Date: Mon, 24 Aug 2015 14:42:07 +0300 Subject: 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() --- sql/events.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'sql/events.cc') 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)) -- cgit v1.2.1