mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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:
@ -326,13 +326,14 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
||||
DBUG_ENTER("mysql_admin_table");
|
||||
DBUG_PRINT("enter", ("extra_open_options: %u", extra_open_options));
|
||||
|
||||
field_list.push_back(item = new Item_empty_string("Table", NAME_CHAR_LEN*2));
|
||||
field_list.push_back(item = new Item_empty_string(thd, "Table",
|
||||
NAME_CHAR_LEN * 2));
|
||||
item->maybe_null = 1;
|
||||
field_list.push_back(item = new Item_empty_string("Op", 10));
|
||||
field_list.push_back(item = new Item_empty_string(thd, "Op", 10));
|
||||
item->maybe_null = 1;
|
||||
field_list.push_back(item = new Item_empty_string("Msg_type", 10));
|
||||
field_list.push_back(item = new Item_empty_string(thd, "Msg_type", 10));
|
||||
item->maybe_null = 1;
|
||||
field_list.push_back(item = new Item_empty_string("Msg_text",
|
||||
field_list.push_back(item = new Item_empty_string(thd, "Msg_text",
|
||||
SQL_ADMIN_MSG_TEXT_SIZE));
|
||||
item->maybe_null = 1;
|
||||
if (protocol->send_result_set_metadata(&field_list,
|
||||
|
Reference in New Issue
Block a user