mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO
Pass THD to Item_field (and all derivatives) constructors. This reduces number of pthread_getspecific() calls from 322 to 292.
This commit is contained in:
@ -93,7 +93,7 @@ static bool init_fields(THD *thd, TABLE_LIST *tables,
|
||||
for (; count-- ; find_fields++)
|
||||
{
|
||||
/* We have to use 'new' here as field will be re_linked on free */
|
||||
Item_field *field= new Item_field(context,
|
||||
Item_field *field= new Item_field(thd, context,
|
||||
"mysql", find_fields->table_name,
|
||||
find_fields->field_name);
|
||||
if (!(find_fields->field= find_field_in_tables(thd, field, tables, NULL,
|
||||
|
Reference in New Issue
Block a user