Commit 2a0f0867 authored by Sergei Golubchik's avatar Sergei Golubchik

don't scream when auto-selected IPv6 is not available

when --bind-address is not specificed explicitly (or set to '*')
MariaDB tries all wildcard addresses. Print a warning (not an error)
if a socket cannot be created for some of them.

Still print an error if a socket cannot be created for an address
that a user has specified expicitly with --bind-address.
parent a453a280
...@@ -2423,10 +2423,11 @@ static MYSQL_SOCKET activate_tcp_port(uint port) ...@@ -2423,10 +2423,11 @@ static MYSQL_SOCKET activate_tcp_port(uint port)
if (mysql_socket_getfd(ip_sock) == INVALID_SOCKET) if (mysql_socket_getfd(ip_sock) == INVALID_SOCKET)
{ {
sql_print_error("Failed to create a socket for %s '%s': errno: %d.", sql_print_message_func func= real_bind_addr_str ? sql_print_error
(a->ai_family == AF_INET) ? "IPv4" : "IPv6", : sql_print_warning;
(const char *) ip_addr, func("Failed to create a socket for %s '%s': errno: %d.",
(int) socket_errno); (a->ai_family == AF_INET) ? "IPv4" : "IPv6",
(const char *) ip_addr, (int) socket_errno);
} }
else else
{ {
......
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