Bug #34269 main.mysql test fails
Submitted: 4 Feb 2008 7:05 Modified: 7 Feb 2008 16:14
Reporter: Colin Charles Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Tests Severity:S3 (Non-critical)
Version:5.1-bk OS:Linux (Fedora 8, x86_64)
Assigned to: CPU Architecture:Any

[4 Feb 2008 7:05] Colin Charles
Description:
In my Bitkeeper checkout (from mysql.bkbits.net), the build is fine, but there is a test failure in main.mysql that fails when I run make test.

How to repeat:
Checkout mysql-5.1, BUILD/compile-dist, run make test, watch for failure. I see this in mysql-maria as well

main.mysql                     [ fail ]

ERROR 1050 (42S01) at line 1: Table 't2' already exists
--- /home/byte/code/mysql-maria/mysql-test/r/mysql.result       2008-01-27 23:13:54.000000000 +0300
+++ /home/byte/code/mysql-maria/mysql-test/r/mysql.reject       2008-02-04 07:44:19.000000000 +0300
@@ -162,8 +162,8 @@
 ERROR 1049 (42000) at line 1: Unknown database 'invalid'
 Test connect with dbname + hostname
 Test connect with dbname + _invalid_ hostname
-ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
-ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
+ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
+ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
 The commands reported in the bug report
 ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
 Too long dbname

mysqltest: Result content mismatch

Aborting: main.mysql failed in default mode. 
To continue, re-run with '--force'.
Stopping All Servers
make: *** [test-ns] Error 1
[4 Feb 2008 12:35] MySQL Verification Team
Thank you for the bug report. I wasn't able to repeat with source pulled
yesterday on FC 8 64-bit. Is your changeset older than I show below if
yes could you please try with the latest one?. Thanks

[miguel@mira mysql-5.1]$ cat /etc/issue
Fedora release 8 (Werewolf)
Kernel \r on an \m

[miguel@mira mysql-5.1]$ file sql/mysqld
sql/mysqld: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

[miguel@mira mysql-5.1]$ bk changes | head
ChangeSet@1.2512, 2008-01-27 14:31:49-07:00, tsmith@ramayana.hindu.god +2 -0
  Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/50
  into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
  MERGE: 1.1810.3470.10

main.myisam                    [ pass ]           1189
main.myisampack                [ pass ]             32
main.mysql                     [ pass ]           2460

ndb.ndb_view                   [ pass ]           1148
ndb.ndbapi                     [ skipped ]   Test requires: 'have_ndbapi_examples'
ndb.ps_7ndb                    [ pass ]          11826
ndb.strict_autoinc_5ndb        [ pass ]           1550
-------------------------------------------------------
Stopping All Servers
mysql-test-run: WARNING: Forcing kill of process 7742
All 534 tests were successful.
The servers were restarted 137 times
Spent 2910.550 of 4182 seconds executing testcases

[miguel@mira mysql-5.1]$
[5 Feb 2008 2:17] Colin Charles
Weird. We obviously have a similar configuration

 file ~/code/mysql-5.1/sql/mysqld
/home/byte/code/mysql-5.1/sql/mysqld: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

[-(~/code/mysql-5.1)> bkf changes|head
OK-root OK
ChangeSet@1.2512, 2008-01-27 14:31:49-07:00, tsmith@ramayana.hindu.god +2 -0
  Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/50
  into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
  MERGE: 1.1810.3470.10
[7 Feb 2008 16:14] MySQL Verification Team
Thank you for the feedback. I am setting Can't Repeat since I used similar
configuration, please open again if you can provide feedback to test again
on my side. Thanks in advance.
[2 Jun 2010 6:34] Aleksandr Kuzminsky
The problem goes down to wrong DNS configuration.

MySQL client tries to connect to non-existing hostname 'invalid_hostname'. It expects to get error 2005, which means 'invalid_hostname' can't get resolved. But if it is resolved MySQL gets error 2003 (Can't connect to MySQL server).

Check 
$ host invalid_hostname

If the request is resolved - it is bad.
[2 Jun 2010 6:34] Yasufumi Kinoshita
What is the result of 
"nslookup invalid_hostname"
or
"ping invalid_hostname"?

If IP address exists for the name 'invalid_hostname', the test will fail.