summaryrefslogtreecommitdiff
path: root/sql/session_tracker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/session_tracker.cc')
-rw-r--r--sql/session_tracker.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/session_tracker.cc b/sql/session_tracker.cc
index 35cd55394a9..3ddece6039b 100644
--- a/sql/session_tracker.cc
+++ b/sql/session_tracker.cc
@@ -443,8 +443,11 @@ bool Session_sysvars_tracker::vars_list::store(THD *thd, String *buf)
show.name= svar->name.str;
show.value= (char *) svar;
+ mysql_mutex_lock(&LOCK_global_system_variables);
const char *value= get_one_variable(thd, &show, OPT_SESSION, SHOW_SYS, NULL,
&charset, val_buf, &val_length);
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+
if (is_plugin)
mysql_mutex_unlock(&LOCK_plugin);