Commit fcf1aab7 authored by unknown's avatar unknown
Browse files

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

parent 3c0e226f
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -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