mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 18:25:30 +02:00
MDEV-10010 - Recursive call to mysql_rwlock_rdlock for LOCK_system_variables_hash
Avoid recursive LOCK_system_variables_hash acquisition in intern_sys_var_ptr() by pre-syncing dynamic session variables.
This commit is contained in:
parent
95c286cedf
commit
ecb27d2650
3 changed files with 77 additions and 60 deletions
|
|
@ -7209,6 +7209,17 @@ int fill_variables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||
COND *partial_cond= make_cond_for_info_schema(thd, cond, tables);
|
||||
|
||||
mysql_rwlock_rdlock(&LOCK_system_variables_hash);
|
||||
|
||||
/*
|
||||
Avoid recursive LOCK_system_variables_hash acquisition in
|
||||
intern_sys_var_ptr() by pre-syncing dynamic session variables.
|
||||
*/
|
||||
if (scope == OPT_SESSION &&
|
||||
(!thd->variables.dynamic_variables_ptr ||
|
||||
global_system_variables.dynamic_variables_head >
|
||||
thd->variables.dynamic_variables_head))
|
||||
sync_dynamic_session_variables(thd, true);
|
||||
|
||||
res= show_status_array(thd, wild, enumerate_sys_vars(thd, sorted_vars, scope),
|
||||
scope, NULL, "", tables->table,
|
||||
upper_case_names, partial_cond);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue