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

Always call vio_in_addr() so that thd->remote is

always initialized. (Bug #5569)
This commit is contained in:
jimw@mysql.com
2005-01-25 12:06:55 -08:00
parent bc35532bcc
commit 94da57dc65
3 changed files with 5 additions and 4 deletions

View File

@@ -501,6 +501,9 @@ check_connections(THD *thd)
thd->thread_id));
DBUG_PRINT("info",("New connection received on %s",
vio_description(net->vio)));
vio_in_addr(net->vio,&thd->remote.sin_addr);
if (!thd->host) // If TCP/IP connection
{
char ip[30];
@@ -521,7 +524,6 @@ check_connections(THD *thd)
#endif
if (!(specialflag & SPECIAL_NO_RESOLVE))
{
vio_in_addr(net->vio,&thd->remote.sin_addr);
thd->host=ip_to_hostname(&thd->remote.sin_addr,&connect_errors);
/* Cut very long hostnames to avoid possible overflows */
if (thd->host)
@@ -543,7 +545,6 @@ check_connections(THD *thd)
DBUG_PRINT("info",("Host: %s",thd->host));
thd->host_or_ip= thd->host;
thd->ip= 0;
bzero((char*) &thd->remote,sizeof(struct sockaddr));
}
vio_keepalive(net->vio, TRUE);