1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Adieu find_sys_var_ex()

Only take LOCK_plugin for plugin system variables.

Reverted optimisation that was originally done for session tracker: it
makes much less sense now. Specifically only if connections would want to
track plugin session variables changes and these changes would actually
happen frequently. If this ever becomes an issue, there're much better
ways to optimise this workload.

Part of MDEV-14984 - regression in connect performance
This commit is contained in:
Sergey Vojtovich
2019-03-21 00:42:48 +04:00
parent 53671a1fff
commit 894df7edb6
5 changed files with 17 additions and 67 deletions

View File

@ -7254,8 +7254,7 @@ bool LEX::set_system_variable(THD *thd, enum_var_type var_type,
{
sys_var *tmp;
if (unlikely(check_reserved_words(name1)) ||
unlikely(!(tmp= find_sys_var_ex(thd, name2->str, name2->length, true,
false))))
unlikely(!(tmp= find_sys_var(thd, name2->str, name2->length, true))))
{
my_error(ER_UNKNOWN_STRUCTURED_VARIABLE, MYF(0),
(int) name1->length, name1->str);
@ -7649,7 +7648,7 @@ int set_statement_var_if_exists(THD *thd, const char *var_name,
my_error(ER_SP_BADSTATEMENT, MYF(0), "[NO]WAIT");
return 1;
}
if ((sysvar= find_sys_var_ex(thd, var_name, var_name_length, true, false)))
if ((sysvar= find_sys_var(thd, var_name, var_name_length, true)))
{
Item *item= new (thd->mem_root) Item_uint(thd, value);
set_var *var= new (thd->mem_root) set_var(thd, OPT_SESSION, sysvar,