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.
This commit is contained in:
Sergei Golubchik 2015-06-14 17:38:30 +02:00
parent a453a28040
commit 2a0f086728

View File

@ -2423,10 +2423,11 @@ static MYSQL_SOCKET activate_tcp_port(uint port)
if (mysql_socket_getfd(ip_sock) == INVALID_SOCKET)
{
sql_print_error("Failed to create a socket for %s '%s': errno: %d.",
(a->ai_family == AF_INET) ? "IPv4" : "IPv6",
(const char *) ip_addr,
(int) socket_errno);
sql_print_message_func func= real_bind_addr_str ? sql_print_error
: sql_print_warning;
func("Failed to create a socket for %s '%s': errno: %d.",
(a->ai_family == AF_INET) ? "IPv4" : "IPv6",
(const char *) ip_addr, (int) socket_errno);
}
else
{