Bug #58578 main.mysql_upgrade test fails
Submitted: 30 Nov 2010 3:41 Modified: 1 Dec 2010 12:12
Reporter: Floren Munteanu Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1.53 OS:Linux (CentOS 5.5 64bits)
Assigned to: CPU Architecture:Any

[30 Nov 2010 3:41] Floren Munteanu
Description:
While compiling the latest tarball, the main.mysql_upgrade test fails.

How to repeat:
configure \
	--with-readline \
	--with-ssl=/usr \
	--without-debug \
	--enable-shared \
	--with-embedded-server \
	--localstatedir=/var/lib/mysql \
	--with-unix-socket-path=/var/run/mysqld/mysqld.sock \
	--with-mysqld-user="mysql" \
	--with-extra-charsets=all \
	--with-big-tables \
	--with-pic \
	--with-plugin-innobase \
	--with-plugin-archive \
	--with-plugin-blackhole \
	--with-plugin-csv \
	--with-plugin-federated \
	--with-plugin-partition \
	--without-example-storage-engine \
	--without-plugin-daemon_example \
	--without-plugin-ftexample \
	--enable-local-infile \
	--enable-largefile \
	--enable-thread-safe-client \
	--disable-dependency-tracking
...
make test
...

main.mysql_upgrade                       [ fail ]
        Test ended at 2010-11-29 22:32:48

CURRENT_TEST: main.mysql_upgrade
--- /home/floren/redhat/BUILD/mysql-5.1.53/mysql-test/r/mysql_upgrade.result    2010-11-03 17:18:49.000000000 +0300
+++ /home/floren/redhat/BUILD/mysql-5.1.53/mysql-test/r/mysql_upgrade.reject    2010-11-30 06:32:48.000000000 +0300
@@ -94,7 +94,7 @@
 mysql.user                                         OK
 DROP USER mysqltest1@'%';
 Run mysql_upgrade with a non existing server socket
-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
 FATAL ERROR: Upgrade failed
 set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
 mtr.global_suppressions                            OK

mysqltest: Result content mismatch

 - saving '/home/floren/redhat/BUILD/mysql-5.1.53/mysql-test/var/log/main.mysql_upgrade/' to '/home/floren/redhat/BUILD/mysql-5.1.53/mysql-test/var/log/main.mysql_upgrade/'

Testing it individually:

$ cd /home/floren/redhat/BUILD/mysql-5.1.53/mysql-test
$ ./mtr main.mysql_upgrade
Logging: ./mtr  main.mysql_upgrade
101129 22:39:24 [Note] Plugin 'FEDERATED' is disabled.
MySQL Version 5.1.53
Checking supported features...
 - skipping ndbcluster
 - SSL connections supported
Collecting tests...
vardir: /home/floren/redhat/BUILD/mysql-5.1.53/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/floren/redhat/BUILD/mysql-5.1.53/mysql-test/var'...
Installing system database...
Using server port 49394

==============================================================================

TEST                                      RESULT   TIME (ms)
------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
main.mysql_upgrade                       [ fail ]
        Test ended at 2010-11-29 22:39:28

CURRENT_TEST: main.mysql_upgrade
--- /home/floren/redhat/BUILD/mysql-5.1.53/mysql-test/r/mysql_upgrade.result    2010-11-03 17:18:49.000000000 +0300
+++ /home/floren/redhat/BUILD/mysql-5.1.53/mysql-test/r/mysql_upgrade.reject    2010-11-30 06:39:28.000000000 +0300
@@ -94,7 +94,7 @@
 mysql.user                                         OK
 DROP USER mysqltest1@'%';
 Run mysql_upgrade with a non existing server socket
-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
 FATAL ERROR: Upgrade failed
 set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
 mtr.global_suppressions                            OK

mysqltest: Result content mismatch

 - saving '/home/floren/redhat/BUILD/mysql-5.1.53/mysql-test/var/log/main.mysql_upgrade/' to '/home/floren/redhat/BUILD/mysql-5.1.53/mysql-test/var/log/main.mysql_upgrade/'
------------------------------------------------------------
The servers were restarted 0 times
Spent 0.000 of 4 seconds executing testcases

Completed: Failed 1/1 tests, 0.00% were successful.

Failing test(s): main.mysql_upgrade

The log files in var/log may give you some hint of what went wrong.

If you want to report this error, please read first the documentation
at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html

mysql-test-run: *** ERROR: there were failing test cases

I've included the main.mysql_upgrade /var/log files, for consultation.
[30 Nov 2010 4:01] Floren Munteanu
Patch that disables the 4 fail tests, while running main test suite only.

Attachment: mysql-disabled_tests.patch (text/x-patch), 915 bytes.

[30 Nov 2010 4:17] Valeriy Kravchuk
No problems here with 5.1.54 on Mac OS X (32-bit build):

macbook-pro:mysql-test openxs$ ./mtr main.mysql_upgrade
Logging: ./mtr  main.mysql_upgrade
101130  6:14:43 [Warning] Setting lower_case_table_names=2 because file system for /var/folders/dX/dXCzvuSlHX4Op1g-o1jIWk+++TI/-Tmp-/6WmszOoKjb/ is case insensitive
101130  6:14:43 [Note] Plugin 'FEDERATED' is disabled.
101130  6:14:43 [Note] Plugin 'ndbcluster' is disabled.
MySQL Version 5.1.54
Checking supported features...
 - skipping ndbcluster
 - SSL connections supported
 - binaries are debug compiled
Collecting tests...
vardir: /Users/openxs/dbs/5.1/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/Users/openxs/dbs/5.1/mysql-test/var'...
Installing system database...
Using server port 58366

==============================================================================

TEST                                      RESULT   TIME (ms)
------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
main.mysql_upgrade                       [ pass ]  41443
------------------------------------------------------------
...
[30 Nov 2010 4:22] Floren Munteanu
Hi Valeriy,

Can you please try it with the perl wrapper?

$ cd mysql-test
$ perl ./mysql-test-run.pl --ssl --mysqld=--binlog-format=mixed --suite=main

It might be related to openssl?
[30 Nov 2010 14:40] MySQL Verification Team
Not repeatable on Windows too:

C:\build\5.1\mysql-test>perl mysql-test-run.pl mysql_upgrade
Found handle.exe version 3.42
Logging: mysql-test-run.pl  mysql_upgrade
101130 12:37:29 [Note] Plugin 'FEDERATED' is disabled.
MySQL Version 5.1.54
Checking supported features...
 - skipping ndbcluster
 - SSL connections supported
Collecting tests...
vardir: C:/build/5.1/mysql-test/var
Removing old var directory...
Creating var directory 'C:/build/5.1/mysql-test/var'...
Installing system database...
Using server port 49254

==============================================================================

TEST                                      RESULT   TIME (ms)
------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
main.mysql_upgrade                       [ pass ]  84843
------------------------------------------------------------
The servers were restarted 0 times
Spent 84.843 of 168 seconds executing testcases

Completed: All 1 tests were successful.
[1 Dec 2010 0:00] Sveta Smirnova
Thank you for the report.

What `ping not_existing_host` and `telnet not_existing_host` outputs in your environment?
[1 Dec 2010 6:42] Floren Munteanu
$ ping not_existing_host
PING mydomain.com ([IP]) 56(84) bytes of data.
64 bytes from [IP]: icmp_seq=1 ttl=55 time=58.5 ms
64 bytes from [IP]: icmp_seq=2 ttl=55 time=58.3 ms
64 bytes from [IP]: icmp_seq=3 ttl=55 time=58.7 ms
64 bytes from [IP]: icmp_seq=4 ttl=55 time=58.7 ms
64 bytes from [IP]: icmp_seq=5 ttl=55 time=58.3 ms

--- mydomain.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 58.304/58.535/58.753/0.278 ms

$ telnet not_existing_host
Trying [IP]...
telnet: connect to address [IP]: Connection refused
telnet: Unable to connect to remote host: Connection refused

Right now I have all my test servers linked to mydomain.com. For example, alpha.mydomain.com is the online server, beta.mydomain.com is the MySQL test server, delta.mydomain.com is the test web server, etc.

When I pinged the not_existing_host, it was returning as answer the live server IP, instead of the local machine where I did the compile.
[1 Dec 2010 12:12] Sveta Smirnova
Thank you for the feedback.

> $ ping not_existing_host
> PING mydomain.com ([IP]) 56(84) bytes of data.
> 64 bytes from [IP]: icmp_seq=1 ttl=55 time=58.5 ms

This shows not_existing_host exists in your environment thus test fails. I'd say this is not a bug. Please ignore the test.