1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Print right hostname or IP in SHOW PROCESSLIST

Use SESSION TABLE_HANDLER as default table handler if given table handler doesn't exists
This commit is contained in:
monty@narttu.mysql.fi
2003-03-19 21:43:41 +02:00
parent 056e88fe24
commit 68ca84dbd1
6 changed files with 64 additions and 11 deletions

View File

@@ -1064,10 +1064,10 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
{
if ((thd_info->host= thd->alloc(LIST_PROCESS_HOST_LEN+1)))
my_snprintf((char *) thd_info->host, LIST_PROCESS_HOST_LEN,
"%s:%u", thd->host_or_ip, tmp->peer_port);
"%s:%u", tmp->host_or_ip, tmp->peer_port);
}
else
thd_info->host= thd->strdup(thd->host_or_ip);
thd_info->host= thd->strdup(tmp->host_or_ip);
if ((thd_info->db=tmp->db)) // Safe test
thd_info->db=thd->strdup(thd_info->db);
thd_info->command=(int) tmp->command;