Bug #28718 Running backup testcase fails in mysql testsuite of MySQL-enterprise-5.0.40
Submitted: 28 May 2007 8:52 Modified: 18 Jun 2007 2:53
Reporter: Bruce Huang Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:MySQL-enterprise-5.0.40, 5.1, 4.1 OS:Linux (rhel5)
Assigned to: Magnus BlÄudd CPU Architecture:Any
Tags: backup case, test framework, test suite

[28 May 2007 8:52] Bruce Huang
Description:
When running mysql test suite bundled with MySQL-enterprise-5.0.40 against MySQL-server-enterprise-gpl-5.0.40-0.rhel5.x86_64.rpm, the 'backup' test case always fails.

How to repeat:
Perform the following steps to reproduce it:
1. run 'rpm -ivh' to install MySQL-client-enterprise-gpl-5.0.40-0.rhel5.x86_64.rpm, MySQL-server-enterprise-gpl-5.0.40-0.rhel5.x86_64.rpm and MySQL-test-enterprise-gpl-5.0.40-0.rhel5.x86_64.rpm
2. make sure that the mysql server is started with default configuration

3. run the test case with the following command:
/usr/share/mysql-test/mysql-test-run.pl --extern --user=root --sock=/var/lib/mysql/mysql.sock backup

4. The result is 
mysqltest: At line 20: query 'select count(*) from t4' failed: 1146: Table 'test.t4' doesn't exist

Suggested fix:
I checked the log file r/backup.log and found all tables are backed up to /var/lib/bogus or /var/lib/tmp. These two directories don't exist at all. According the documentation of mysql test framework, '/var/lib' should be the value of $MYSQLTEST_VARDIR, which is substituted into the result file in t/backup.result. However, even though I added '--vardir=/user/share/mysql-test/var' in the commandline, the log file still contained '/var/lib' instead of '/user/share/mysql-test/var'.
[28 May 2007 9:05] Sveta Smirnova
Thank you for the report.

But version 5.0.40 is a bit old. Please upgrade to current 5.0.42, try with it and say us result.
[28 May 2007 9:12] Sveta Smirnova
Thank you for the report.

No feedback needed. Verified as described using last BK sources.

To repeat you have to use --extern option.
[28 May 2007 9:19] Bruce Huang
Thanks for your quick response

I believe there is the same problem when running 'blackhole' test case in the testsuite. I got the following error:

mysqltest: At line 112: query 'load data infile '../std_data_ln/words.dat' into table t2' failed: 13: Can't get stat of '/var/lib/std_data_ln/words.dat' (Errcode: 2)

Please make verification if possible.
[28 May 2007 9:55] Sveta Smirnova
Thank you for the feedback.

But cause of failure of blackhole test is another. So I created new bug report Bug #28721
[7 Jun 2007 12:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/28293

ChangeSet@1.2510, 2007-06-07 14:25:17+02:00, msvensson@pilot.(none) +3 -0
  Bug#28718 Running backup testcase fails in mysql testsuite
   - Skip test if the mysqld to test is not started from MYSQLTEST_VARDIR
[8 Jun 2007 4:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/28359

ChangeSet@1.2526, 2007-06-07 23:18:19+02:00, msvensson@pilot.(none) +1 -0
  Bug#28718 Running backup testcase fails in mysql testsuite of MySQL-enterprise-5.0.40
   - Fix test to work on OS where backslashes are forward
[16 Jun 2007 4:50] Bugs System
Pushed into 5.0.44
[16 Jun 2007 4:50] Bugs System
Pushed into 5.1.20-beta
[18 Jun 2007 2:53] Paul DuBois
Test suite change. No changelog entry needed.