summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-01-21 12:40:20 +0100
committerSergei Golubchik <serg@mariadb.org>2022-01-21 16:02:34 +0100
commit4504e6d14e71f53043c75b80e83f25938ac63bb1 (patch)
treeb1c701b46ea0345200c0629dd54eb096db48c059 /sql
parentc9beef43154a199bfcd9f71049c011a2ed77ca74 (diff)
downloadmariadb-git-4504e6d14e71f53043c75b80e83f25938ac63bb1.tar.gz
test cases for MySQL bugs
also fix a comment, and update a macro just in case
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_show.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 9483db9eff9..c708849d049 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2683,6 +2683,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
tmp_sctx->host_or_ip :
tmp_sctx->host ? tmp_sctx->host : "");
thd_info->command=(int) tmp->get_command();
+ /* Lock THD mutex that protects its data when looking at it. */
mysql_mutex_lock(&tmp->LOCK_thd_data);
if ((thd_info->db= tmp->db)) // Safe test
thd_info->db= thd->strdup(thd_info->db);
@@ -2694,7 +2695,6 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
if (mysys_var)
mysql_mutex_unlock(&mysys_var->mutex);
- /* Lock THD mutex that protects its data when looking at it. */
if (tmp->query())
{
uint length= MY_MIN(max_query_length, tmp->query_length());