1
0
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:
Sergey Vojtovich
2015-06-18 18:01:56 +04:00
parent b85e5efca3
commit 360176f397
8 changed files with 36 additions and 36 deletions

View File

@ -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,