Bug #64401 main.mysqldump fails in 5.5.21
Submitted: 21 Feb 2012 18:47 Modified: 29 Feb 2012 19:52
Reporter: Nathan Rennie-Waldock Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.5.21 OS:Linux
Assigned to: CPU Architecture:Any

[21 Feb 2012 18:47] Nathan Rennie-Waldock
Description:
main.mysqldump now fails in 5.5.21. There's extra output showing up causing it to fail.

main.mysqldump                           [ fail ]
        Test ended at 2012-02-21 14:25:09

CURRENT_TEST: main.mysqldump
mysqldump: Couldn't find table: "non_existing"
mysqldump: Got error: 1356: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them when using LOCK TABLES
mysqldump: Couldn't execute 'SHOW FIELDS FROM `v1`': View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)
mysqldump: Got error: 1083: Field separator argument is not what is expected; check the manual when executing 'SELECT INTO OUTFILE'
mysqldump: Got error: 1083: Field separator argument is not what is expected; check the manual when executing 'SELECT INTO OUTFILE'
mysqldump: Got error: 1083: Field separator argument is not what is expected; check the manual when executing 'SELECT INTO OUTFILE'
mysqldump: user2 has insufficent privileges to SHOW CREATE PROCEDURE `sp1`!
mysqldump: Got error: 1146: Table 'test.???????????????????????' doesn't exist when using LOCK TABLES
mysqldump: Got error: 1083: Field separator argument is not what is expected; check the manual when executing 'SELECT INTO OUTFILE'
mysqldump: Got error: 1083: Field separator argument is not what is expected; check the manual when executing 'SELECT INTO OUTFILE'
mysqldump: user1 has insufficent privileges to SHOW CREATE FUNCTION `hello1`!
--- /build/buildd/mysql-5.5-5.5.21/builddir/mysql-test/r/mysqldump.result	2012-02-21 14:48:51.000000000 +0300
+++ /build/buildd/mysql-5.5-5.5.21/builddir/mysql-test/r/mysqldump.reject	2012-02-21 17:25:09.000000000 +0300
@@ -5122,8 +5122,6 @@
 -- main : logs flushed successfully!
 -- Starting transaction...
 -- Retrieving table structure for table t1...
--- Sending SELECT query...
--- Retrieving rows...
 --
 -- Host: localhost    Database: b12809202_db
 -- ------------------------------------------------------
@@ -5147,7 +5145,9 @@
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
 /*!40101 SET character_set_client = utf8 */;
 CREATE TABLE `t1` (
-  `c1` int(11) DEFAULT NULL
+  `c1` int(11) DEFA-- Sending SELECT query...
+-- Retrieving rows...
+ULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 /*!40101 SET character_set_client = @saved_cs_client */;
 

mysqltest: Result content mismatch

How to repeat:
Run the main.mysqldump test.
[22 Feb 2012 8:50] Valeriy Kravchuk
I can not repeat this with current mysql-5.5 on 64-bit FC14:

[openxs@chief mysql-test]$ ./mtr mysqldump
Logging: ./mtr  mysqldump
120222 10:49:29 [Note] Plugin 'FEDERATED' is disabled.
MySQL Version 5.5.23
Checking supported features...
 - skipping ndbcluster
 - SSL connections supported
 - binaries are debug compiled
Collecting tests...
vardir: /home/openxs/dbs/5.5/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/openxs/dbs/5.5/mysql-test/var'...
Installing system database...
Using server port 58404

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

TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
main.mysqldump                           [ pass ]  19135
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 19.135 of 32 seconds executing testcases

Completed: All 1 tests were successful.
[22 Feb 2012 23:45] MySQL Verification Team
On Windows I got different error:

H:\build\5.5-2012-02-22\mysql-test>perl mysql-test-run.pl mysqldump
Logging: mysql-test-run.pl  mysqldump
120222 21:42:55 [Note] Plugin 'FEDERATED' is disabled.
MySQL Version 5.5.23
Checking supported features...
 - skipping ndbcluster
 - SSL connections supported
Collecting tests...
vardir: H:/build/5.5-2012-02-22/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory 'H:/build/5.5-2012-02-22/mysql-test/var'...
Installing system database...
Using server port 54551

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

TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
main.mysqldump                           [ fail ]  Found warnings/errors in server log file!
        Test ended at 2012-02-22 21:43:29
line
120223  2:43:21 [ERROR] H:/build/5.5-2012-02-22/sql/Release/mysqld.exe: Can't find file: './test/@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f
003f@003f.frm' (errno: 22)
^ Found warnings in H:/build/5.5-2012-02-22/mysql-test/var/log/mysqld.1.err
ok

 - saving 'H:/build/5.5-2012-02-22/mysql-test/var/log/main.mysqldump/' to 'H:/build/5.5-2012-02-22/mysql-test/var/log/main.mysqldump/'
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 0.000 of 34 seconds executing testcases
mysql-test-run: WARNING: Got errors/warnings while running tests, please examine 'H:/build/5.5-2012-02-22/mysql-test/var/log/warnings' for details.

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

Failing test(s): main.mysqldump

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
[28 Feb 2012 19:19] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior too. Which MySQL package do you use? (File name you downloaded)
[28 Feb 2012 21:31] Nathan Rennie-Waldock
I'm building from the 5.5.21 source tgz and get consistent failures on the mysqldump test. I've built on Ubuntu 10.04, 11.04, 11.10 and 12.04 (32bit and 64bit for each), and it fails on every single build with the exact same result. Though for some reason it passes on my own Ubuntu 11.10 64bit system.
[28 Feb 2012 21:43] Sveta Smirnova
Thank you for the feedback.

Please send us cmake options you build MySQL with.
[29 Feb 2012 19:24] Nathan Rennie-Waldock
CXX=g++-4.5 CC=gcc-4.5 CFLAGS="-O2 -DBIG_JOINS=1 -fno-strict-aliasing"	CXXFLAGS="-O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti  -fno-strict-aliasing" cmake -DCMAKE_INSTALL_PREFIX=/usr -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock -DMYSQL_USER=mysql -DWITH_LIBWRAP=ON -DWITH_LIBREADLINE=OFF -DWITH_SSL=yes -DSYSTEM_TYPE="debian-linux-gnu" -DINSTALL_LAYOUT=RPM -DINSTALL_LIBDIR=lib/i386-linux-gnu -DINSTALL_PLUGINDIR=lib/mysql/plugin -DWITH_EMBEDDED_SERVER=ON -DHAVE_EMBEDDED_PRIVILEGE_CONTROL=ON -DWITH_EXTRA_CHARSETS=all .
[29 Feb 2012 19:52] Sveta Smirnova
Thank you for the feedback.

Verified as described. I used gcc 4.4.2 on RedHat 5
[7 Mar 2012 18:42] Clint Byrum
Just adding another data point, I've seen this exact fail on Ubuntu 12.04 as well, building 5.5.21 as a package. The package can be checked out with bzr as such:

bzr co --lightweight -c 20 lp:ubuntu/mysql-5.5
[8 Mar 2012 7:00] Clint Byrum
I believe this is happening because the test is run with --verbose. The verbose messages end up on stderr, while the rest of the output is on stdout. The fflush's done by verbose_msg should prevent this from causing issues, but I think it probably makes more sense to run the test without --verbose.
[8 Mar 2012 19:20] Clint Byrum
Turns off --verbose

Attachment: fix-mysqldump-test.patch (text/x-patch), 1.75 KiB.

[8 Mar 2012 19:46] Clint Byrum
I've attached a patch which makes the test run reliably for me now. Seems like it does not compromise the test's intentions.