mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -3816,7 +3816,7 @@ bool mysql_show_binlog_events(THD* thd)
|
||||
|
||||
DBUG_ENTER("mysql_show_binlog_events");
|
||||
|
||||
Log_event::init_show_field_list(&field_list);
|
||||
Log_event::init_show_field_list(thd, &field_list);
|
||||
if (protocol->send_result_set_metadata(&field_list,
|
||||
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
|
||||
DBUG_RETURN(TRUE);
|
||||
@ -4002,11 +4002,11 @@ bool show_binlog_info(THD* thd)
|
||||
Protocol *protocol= thd->protocol;
|
||||
DBUG_ENTER("show_binlog_info");
|
||||
List<Item> field_list;
|
||||
field_list.push_back(new Item_empty_string("File", FN_REFLEN));
|
||||
field_list.push_back(new Item_return_int("Position",20,
|
||||
field_list.push_back(new Item_empty_string(thd, "File", FN_REFLEN));
|
||||
field_list.push_back(new Item_return_int(thd, "Position", 20,
|
||||
MYSQL_TYPE_LONGLONG));
|
||||
field_list.push_back(new Item_empty_string("Binlog_Do_DB",255));
|
||||
field_list.push_back(new Item_empty_string("Binlog_Ignore_DB",255));
|
||||
field_list.push_back(new Item_empty_string(thd, "Binlog_Do_DB", 255));
|
||||
field_list.push_back(new Item_empty_string(thd, "Binlog_Ignore_DB", 255));
|
||||
|
||||
if (protocol->send_result_set_metadata(&field_list,
|
||||
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
|
||||
@ -4057,8 +4057,8 @@ bool show_binlogs(THD* thd)
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
field_list.push_back(new Item_empty_string("Log_name", 255));
|
||||
field_list.push_back(new Item_return_int("File_size", 20,
|
||||
field_list.push_back(new Item_empty_string(thd, "Log_name", 255));
|
||||
field_list.push_back(new Item_return_int(thd, "File_size", 20,
|
||||
MYSQL_TYPE_LONGLONG));
|
||||
if (protocol->send_result_set_metadata(&field_list,
|
||||
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
|
||||
|
Reference in New Issue
Block a user