mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -1542,7 +1542,7 @@ static int mysql_test_select(Prepared_statement *stmt,
|
||||
List<Item> fields(lex->select_lex.item_list);
|
||||
|
||||
/* Change columns if a procedure like analyse() */
|
||||
if (unit->last_procedure && unit->last_procedure->change_columns(fields))
|
||||
if (unit->last_procedure && unit->last_procedure->change_columns(thd, fields))
|
||||
goto error;
|
||||
|
||||
/*
|
||||
@ -1898,7 +1898,7 @@ static bool mysql_test_multidelete(Prepared_statement *stmt,
|
||||
TABLE_LIST *tables)
|
||||
{
|
||||
stmt->thd->lex->current_select= &stmt->thd->lex->select_lex;
|
||||
if (add_item_to_list(stmt->thd, new Item_null()))
|
||||
if (add_item_to_list(stmt->thd, new Item_null(stmt->thd)))
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), 0);
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user