1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-29988: Major performance regression with 10.6.11

The idea is to put Item_direct_ref_to_item as a transparent and
permanent wrapper before a string which require conversion.
So that Item_direct_ref_to_item would be the only place where
the pointer to the string item is stored, this pointer can be changed
and restored during PS execution as needed. And if any permanent
(subquery) optimization would need a pointer to the item,
it'll use a pointer to the Item_direct_ref_to_item - which is
a permanent item and won't go away.
This commit is contained in:
Dmitry Shulga
2022-12-09 21:10:25 +07:00
committed by Sergei Golubchik
parent a9b31b0814
commit 37a316c01d
6 changed files with 215 additions and 18 deletions

View File

@ -539,7 +539,7 @@ bool Item_func_in::create_value_list_for_tvc(THD *thd,
if (is_list_of_rows)
{
Item_row *row_list= (Item_row *)(args[i]->build_clone(thd));
Item_row *row_list= (Item_row *)(args[i]);
if (!row_list)
return true;
@ -564,8 +564,7 @@ bool Item_func_in::create_value_list_for_tvc(THD *thd,
sprintf(col_name, "_col_%i", 1);
args[i]->set_name(thd, col_name, strlen(col_name), thd->charset());
}
Item *arg_clone= args[i]->build_clone(thd);
if (!arg_clone || tvc_value->push_back(arg_clone))
if (tvc_value->push_back(args[i]))
return true;
}