Bug #35485 Wildcard hosts in DNS will result in failing mysql and mysql_upgrade tests
Submitted: 21 Mar 2008 16:25 Modified: 1 Dec 2009 8:18
Reporter: Norbert Tretkowski Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.0.51a, 5.0.67, 5.1 bzr OS:Linux (Debian)
Assigned to: CPU Architecture:Any

[21 Mar 2008 16:25] Norbert Tretkowski
Description:
The tests mysql and mysql_upgrade fail when /etc/resolv.conf contains a search
domain which has wildcard hosts in DNS configured. The DNS resolves *.domain
to 1.2.3.4, so not_existing_host.domain also resolves to 1.2.3.4, resulting in
an unexpected error when running the test because 1.2.3.4 refused the
connection:

-mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
+mysqlcheck: Got error: 2003: Can't connect to MySQL server on 'not_existing_host' (errno) when trying to connect

As discussed with Azundris on IRC I tried to use not_existing_host.invalid in the test and result files, but it didn't help:

-mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host.invalid' (errno) when trying to connect
+mysqlcheck: Got error: 2003: Can't connect to MySQL server on 'not_existing_host.invalid' (errno) when trying to connect

As a quick workaround I just removed the search domain from resolv.conf.

How to repeat:
Use a search domain in resolv.conf which has wildcard hosts configured and run mysql or mysql_upgrade tests.
[22 Mar 2008 8:36] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior in myenvironment. Please provide content of your resolv.conf file.
[22 Apr 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[10 Jun 2008 13:08] Norbert Tretkowski
Meanwhile, this bug was also reported in the Debian bug tracking system:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=485043

My resolv.conf file only contains an internal domain and an internal nameserver, which has wildcard hosts for the internal domain configured.
[30 Jun 2008 1:04] Karanbir Singh
This is still an issue with 5.0.62....

contents of my /etc/resolv.conf
search centos.org
nameserver ::1
[15 Oct 2008 5:58] Sveta Smirnova
Thank you for the feedback.

Please try with current version 5.0.67 and if problem still exists provide command you use to invoke mysql_upgrade
[16 Oct 2008 9:22] Norbert Tretkowski
The problem still exists in 5.0.67. The failing tests are part of a standard testsuite run called with "make test-force" after build.
[22 May 2009 7:42] Sveta Smirnova
Thank you for the feedback.

Please also provide content of your /etc/hosts file: I want to check if it is related to bug #45017
[22 Jun 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[5 Aug 2009 20:20] Norbert Tretkowski
Karanbir Singh already posted his /etc/hosts file, I'm able to reproduce this problem with it.
[1 Dec 2009 8:18] Sveta Smirnova
Thank you for the feedback.

Verified as described, although only mysql_upgrade test fails for me.

To easily repeat:

add string

128.0.0.2   not_existing_host

to /etc/hosts, then run test.
[14 Dec 2009 15:07] Brian Evans
To get the mysql test to fail:

add string

128.0.0.2   invalid_hostname

to /etc/hosts, then run test.