diff options
author | monty@mashka.mysql.fi <> | 2002-12-11 13:32:31 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-12-11 13:32:31 +0200 |
commit | 146814f2eaac6b9a43da72a19456c50eb297c9cb (patch) | |
tree | 13f329218555066905528ead26fa433e37531ab1 /sql/sql_show.cc | |
parent | 215df4fc23ad51e402776d4fd82344144ae18d1e (diff) | |
parent | 53ac261312965b2baf35a8ef66ccdad35af43ea8 (diff) | |
download | mariadb-git-146814f2eaac6b9a43da72a19456c50eb297c9cb.tar.gz |
Merge with 3.23
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 8dfe5e9e948..02f4655c655 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1046,6 +1046,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) THD *tmp; while ((tmp=it++)) { + struct st_my_thread_var *mysys_var; if ((tmp->net.vio || tmp->system_thread) && (!user || (tmp->user && !strcmp(tmp->user,user)))) { @@ -1062,8 +1063,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) if ((thd_info->db=tmp->db)) // Safe test thd_info->db=thd->strdup(thd_info->db); thd_info->command=(int) tmp->command; - if (tmp->mysys_var) - pthread_mutex_lock(&tmp->mysys_var->mutex); + if ((mysys_var= tmp->mysys_var)) + pthread_mutex_lock(&mysys_var->mutex); thd_info->proc_info= (char*) (tmp->killed ? "Killed" : 0); thd_info->state_info= (char*) (tmp->locked ? "Locked" : tmp->net.reading_or_writing ? @@ -1075,8 +1076,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) tmp->mysys_var && tmp->mysys_var->current_cond ? "Waiting on cond" : NullS); - if (tmp->mysys_var) - pthread_mutex_unlock(&tmp->mysys_var->mutex); + if (mysys_var) + pthread_mutex_unlock(&mysys_var->mutex); #if !defined(DONT_USE_THR_ALARM) && ! defined(SCO) if (pthread_kill(tmp->real_id,0)) |