summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Nozdrin <alexander.nozdrin@oracle.com>2011-04-08 14:23:36 +0400
committerAlexander Nozdrin <alexander.nozdrin@oracle.com>2011-04-08 14:23:36 +0400
commit31e7450c608e38479b41da8e4e0fc7dad5d4246f (patch)
tree9a31e755274165f13c43c7199d63beb42ba0ce1f /include
parentb2fee393b029e5e2ec7c0a3161d665dad9fa720f (diff)
downloadmariadb-git-31e7450c608e38479b41da8e4e0fc7dad5d4246f.tar.gz
A patch for Bug#12325375: THE SERVER ON WINXP DOES NOT ALLOW CONNECTIONS
IF NO DNS-SERVER AVAILABLE. The thing is that on Windows XP getnameinfo() returns WSANO_DATA when hostname-lookup is not available. The problem was that this error code was treated as serious error and the client connection got rejected. The fix is to treat all errors from getnameinfo() as not ciritical, but add IP-address to the host cache only for EAI_NONAME (or WSANO_DATA).
Diffstat (limited to 'include')
-rw-r--r--include/violite.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/violite.h b/include/violite.h
index f4083216894..140f021ebb4 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -93,6 +93,8 @@ ssize_t vio_pending(Vio *vio);
my_bool vio_get_normalized_ip_string(const struct sockaddr *addr, int addr_length,
char *ip_string, size_t ip_string_size);
+my_bool vio_is_no_name_error(int err_code);
+
int vio_getnameinfo(const struct sockaddr *sa,
char *hostname, size_t hostname_size,
char *port, size_t port_size,