summaryrefslogtreecommitdiff
path: root/sql/hostname.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-04-29 17:03:34 +0300
committerunknown <monty@mysql.com>2005-04-29 17:03:34 +0300
commit97b0821462cd21d5051b3264f072ea3d4a7a8d7f (patch)
tree0caae1ad50324015508cbda7e4ef72f92ca69c25 /sql/hostname.cc
parent2a69f0049b3fd6e765e2f58a81ea7b5e3d5dcd1c (diff)
downloadmariadb-git-97b0821462cd21d5051b3264f072ea3d4a7a8d7f.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) configure.in: Fix compiler problems with MinGW (Bug #8872) include/config-win.h: Fix compiler problems with MinGW (Bug #8872) include/my_global.h: Fix compiler problems with MinGW (Bug #8872) mysql-test/r/cast.result: Test for cast to signed/unsigned outside of range (Bug #7036) mysql-test/t/cast.test: Test for cast to signed/unsigned outside of range (Bug #7036) mysys/default.c: Cleanup (combine identical code). Done mainly by Jani sql/field.h: Added cast_to_int_type() to ensure that enums are casted as numbers sql/hostname.cc: Don't block not resolved IP's if DNS server is down (Bug #8467) sql/item.h: Added cast_to_int_type() to ensure that enums are casted as numbers sql/item_func.cc: 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 sql/item_func.h: CAST(string_argument AS UNSIGNED) didn't work for big integers above the signed range. (Bug #7036)
Diffstat (limited to 'sql/hostname.cc')
-rw-r--r--sql/hostname.cc9
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);
}