Fix shortcircuit of 127.0.0.1 -> localhost lookup on little-endian machines. (Bug #11822)
(Originally: 1.1891 05/07/25 12:07:47 jimw@mysql.com )
This commit is contained in:
parent
e15dd02241
commit
bcace631ee
@ -6,7 +6,7 @@ AC_PREREQ(2.57)dnl Minimum Autoconf version required.
|
||||
AC_INIT(sql/mysqld.cc)
|
||||
AC_CANONICAL_SYSTEM
|
||||
# Don't forget to also update the NDB lines below.
|
||||
AM_INIT_AUTOMAKE(mysql, 5.0.10-beta)
|
||||
AM_INIT_AUTOMAKE(mysql, 5.0.10a-beta)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
PROTOCOL_VERSION=10
|
||||
|
@ -143,8 +143,8 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
|
||||
*errors=0;
|
||||
|
||||
/* We always treat the loopback address as "localhost". */
|
||||
if (in->s_addr == INADDR_LOOPBACK)
|
||||
return (char *)my_localhost;
|
||||
if (in->s_addr == htonl(INADDR_LOOPBACK)) // is expanded inline by gcc
|
||||
DBUG_RETURN((char *)my_localhost);
|
||||
|
||||
/* Check first if we have name in cache */
|
||||
if (!(specialflag & SPECIAL_NO_HOST_CACHE))
|
||||
|
Loading…
x
Reference in New Issue
Block a user