Fix for bug #11174 (can't determine hostname under Windows 64-bit)

parent 1de6c26e
......@@ -1276,19 +1276,6 @@ static void server_init(void)
int arg=1;
DBUG_ENTER("server_init");
#ifdef __WIN__
if (!opt_disable_networking)
{
WSADATA WsaData;
if (SOCKET_ERROR == WSAStartup (0x0101, &WsaData))
{
/* errors are not read yet, so we use test here */
my_message(ER_WSAS_FAILED, "WSAStartup Failed", MYF(0));
unireg_abort(1);
}
}
#endif /* __WIN__ */
set_ports();
if (mysqld_port != 0 && !opt_disable_networking && !opt_bootstrap)
......@@ -3015,6 +3002,19 @@ int main(int argc, char **argv)
}
#endif
#ifdef __WIN__
if (!opt_disable_networking)
{
WSADATA WsaData;
if (SOCKET_ERROR == WSAStartup (0x0101, &WsaData))
{
/* errors are not read yet, so we use test here */
my_message(ER_WSAS_FAILED, "WSAStartup Failed", MYF(0));
unireg_abort(1);
}
}
#endif /* __WIN__ */
if (init_common_variables(MYSQL_CONFIG_NAME,
argc, argv, load_default_groups))
unireg_abort(1); // Will do exit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment