1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

client port number added to SHOW PROCESSLIST (SCRUM?)

include/violite.h:
  port added to reported parameters
libmysqld/lib_vio.c:
  port added to reported parameters
sql/sql_class.h:
  port added to reported parameters
sql/sql_parse.cc:
  port added to reported parameters
sql/sql_show.cc:
  SHOW PROCESSLIST will report port number if it is possible
vio/viosocket.c:
  port added to reported parameters
This commit is contained in:
unknown
2003-02-17 22:07:26 +02:00
parent 65508b65ba
commit 1b9b2c3091
6 changed files with 25 additions and 13 deletions

View File

@ -482,7 +482,7 @@ check_connections(THD *thd)
{
char ip[30];
if (vio_peer_addr(net->vio,ip))
if (vio_peer_addr(net->vio, ip, &thd->peer_port))
return (ER_BAD_HOST_ERROR);
if (!(thd->ip = my_strdup(ip,MYF(0))))
return (ER_OUT_OF_RESOURCES);
@ -512,8 +512,9 @@ check_connections(THD *thd)
else /* Hostname given means that the connection was on a socket */
{
DBUG_PRINT("info",("Host: %s",thd->host));
thd->host_or_ip=thd->host;
thd->ip=0;
thd->host_or_ip= thd->host;
thd->ip= 0;
thd->peer_port= 0;
bzero((char*) &thd->remote,sizeof(struct sockaddr));
}
/* Ensure that wrong hostnames doesn't cause buffer overflows */