Bug #27460 Test Failures from both rpm and source build
Submitted: 26 Mar 2007 23:58 Modified: 9 Jun 2007 17:50
Reporter: Shawn Duncan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:5.0.37 OS:Linux (Centos 4 x86_64)
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: regression

[26 Mar 2007 23:58] Shawn Duncan
Description:
mysql-test-run results in the following failures both from rpm file and source file install:

 fix_priv_tables information_schema mysql_upgrade mysqldump system_mysql_db_fix40123

How to repeat:
I installed 5.03.37 using the following rpm files

MySQL-server-5.0.37-0.glibc23.x86_64.rpm
MySQL-shared-5.0.37-0.glibc23.x86_64.rpm
MySQL-devel-5.0.37-0.glibc23.x86_64.rpm
MySQL-client-5.0.37-0.glibc23.x86_64.rpm 
MySQL-bench-5.0.37-0.glibc23.x86_64.rpm 

mysql-test-run stalled at fix_priv_tables as follows:
----- 
fix_priv_tables [ fail ] 

Errors are (from /usr/share/mysql-test/var/log/mysqltest-time) : 
sh: -c: line 0: syntax error near unexpected token `>' 
sh: -c: line 0: `/usr/bin/mysql --no-defaults --host=localhost --user=root --password= --port=9306 --socket=/usr/share/mysql-test/var/tmp/master.sock --character-sets-dir=/usr/share/mysql/charsets --force mysql < > /usr/share/mysql-test/var/log/fix_priv_tables.log 2>&1' 
mysqltest: At line 47: command "$MYSQL --force mysql < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/log/fix_priv_tables.log 2>&1" failed 
(the last lines may be the most important ones) 
Result from queries before failure can be found in r/fix_priv_tables.log 
-----
Uninstalled rpm packages.  Built from source, mysql-test-run produces the same, with --force produces the 5 failures listed.

Suggested fix:
I don't know.
[28 Mar 2007 8:25] Sveta Smirnova
Thank you for the report.

I can not repeat it with bash. Please provide output of echo $SHELL
[28 Mar 2007 10:53] Shawn Duncan
Well that's odd, because I use bash:

$ echo $SHELL
/bin/bash
[28 Mar 2007 17:32] Valeriy Kravchuk
Please, send the results of

env 

command from the same environment where you ran tests.
[28 Mar 2007 17:47] Shawn Duncan
I should also note that 5.0.27 builds and passes all tests on this server (except the known failure of "view")
[4 Apr 2007 11:26] Vladimir Michl
I am having the same problem on Fedora Core 6, using rhel4.src.rpm on MySQL 5.0.38.

Building with 
$ rpmbuild --define 'enterprise 1' mysql-5.0.38.rhel4.spec

under user mysqldev.

Interesting is, that this test passes during rpm build, but then fails when executed from /usr/share/mysql-test with binaries installed.

Before starting the tests, I chown -R the whole /usr/share/mysql-test to mysqldev and then run ./mysql-test-run --force.

There is one more test with the same problem, system-mysql-db-fix40123.

The error output is the same as mentioned with another comment. There is no log in var/log, but the log from t/ will be attached.

Using bash 3.1.
[4 Apr 2007 11:28] Vladimir Michl
t/fix_priv_tables.log

Attachment: fix_priv_tables.log (text/x-log), 1.04 KiB.

[4 Apr 2007 11:39] Vladimir Michl
For the system_mysql_db_fix40123, I cannot find any relevant files.
[30 Apr 2007 14:08] Magnus Blåudd
This problem occurs when mysql-test-run.pl don't set the environment variable MYSQL_FIX_PRIVILEGE_TABLES. It's used by mysqltest for finding the location of that mysql_fix_privileg_tables.sql script.

A patch has already been committed to our source repository to skip the test if that environment variable is not set.
[30 Apr 2007 14:09] Magnus Blåudd
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html
[9 Jun 2007 17:50] Paul DuBois
Test suite change. No changelog entry needed.