Commit 164270bc authored by unknown's avatar unknown

MBug#443092: test cases mysql and mysql_upgrade fails with wildcard DNS

When DNS is not working and returns some address even for non-existing
host names, some test cases fail with wrong error.

Fix by disabling these tests on such systems.
parent 52d92de3
#
# Check if we have a working DNS.
# Some 'wildcard dns' return some address even for non-existing hosts. This
# makes it hard to test connections to such host names.
# The actual check for working DNS is done in Perl, and the result available
# in an environment variable.
#
--require r/have_working_dns.require
disable_query_log;
eval SELECT LENGTH('$HAVE_BROKEN_DNS') = 0 AS 'have_working_dns';
enable_query_log;
......@@ -2003,6 +2003,15 @@ sub environment_setup {
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
#
# Some stupid^H^H^H^H^H^Hignorant network providers set up "wildcard DNS"
# servers that return some given web server address for any lookup of a
# non-existent host name. This confuses test cases that want to test the
# behaviour when connecting to a non-existing host, so we need to be able
# to disable those tests when DNS is broken.
#
$ENV{HAVE_BROKEN_DNS}= defined(gethostbyname('invalid_hostname'));
# ----------------------------------------------------
# Setup env for NDB
# ----------------------------------------------------
......
-- source include/have_working_dns.inc
# This test should work in embedded server after we fix mysqltest
-- source include/not_embedded.inc
#
......
-- source include/have_working_dns.inc
# Can't run test of external client with embedded server
-- source include/not_embedded.inc
......
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