diff options
author | monty@mysql.com <> | 2005-04-29 17:03:34 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2005-04-29 17:03:34 +0300 |
commit | fbf31c4a8c68419c689c52c031a98275755a0961 (patch) | |
tree | 0caae1ad50324015508cbda7e4ef72f92ca69c25 /sql/hostname.cc | |
parent | 948fce01b3ec235c2e8e3b40f660f327a836abe8 (diff) | |
download | mariadb-git-fbf31c4a8c68419c689c52c031a98275755a0961.tar.gz |
CAST(string_argument AS UNSIGNED) didn't work for big integers above the signed range. (Bug #7036)
Produce warnings of wrong cast of strings to signed/unsigned.
Don't block not resolved IP's if DNS server is down (Bug #8467)
Fix compiler problems with MinGW (Bug #8872)
Diffstat (limited to 'sql/hostname.cc')
-rw-r--r-- | sql/hostname.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/hostname.cc b/sql/hostname.cc index c74d230bbcb..fe2fad6f3b2 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -177,7 +177,14 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors) &tmp_errno))) { DBUG_PRINT("error",("gethostbyname_r returned %d",tmp_errno)); - add_wrong_ip(in); + /* + Don't cache responses when the DSN server is down, as otherwise + transient DNS failure may leave any number of clients (those + that attempted to connect during the outage) unable to connect + indefinitely. + */ + if (tmp_errno == HOST_NOT_FOUND || tmp_error == NO_DATA) + add_wrong_ip(in); my_gethostbyname_r_free(); DBUG_RETURN(0); } |