Bug #40849 Backup tests assume value of @@datadir and @@backupdir
Submitted: 19 Nov 2008 11:00 Modified: 26 Mar 2009 18:09
Reporter: Rafal Somla Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:6.0 OS:Any
Assigned to: Hema Sridharan CPU Architecture:Any
Tags: Backup

[19 Nov 2008 11:00] Rafal Somla
Description:
Backup tests (in backup and backup_engines suites) assume that the value of @@datadir is $MYSQLTEST_VARDIR/master-data/ and that @@backupdir equals @@datadir. This will trigger problems if one of these assumptions becomes false, e.g. because of changes in the testing framework.

It is possible and easy to write these tests so that they use the real value of @@datadir and @@backupdir and don't need these assumptions.

How to repeat:
Read test cases.

Suggested fix:
Instead of:

 --remove_file $MYSQLTEST_VARDIR/master-data/test.bak

use this:

 let $bdir=`SELECT @@backupdir`;
 --remove_file $bdir/test.bak
[19 Nov 2008 11:33] Sveta Smirnova
Thank you for the report.

Verified as described. Indicated code exists only in backup_errors.test
[19 Nov 2008 12:03] Rafal Somla
I think $MYSQLTEST_VARDIR/master-data/ is used in many other backup tests. For example in the main backup.test.
[18 Feb 2009 23:13] 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/66818

2773 Hema Sridharan	2009-02-19
      BUG#40849. Most of the backup tests are replced to use 
      BACKUPDIR=`select @@backupdir` instead of using DATADIR.
      This will help in reducing the tests fail when there are changes
      in assumptions for usage of datadir.
[18 Feb 2009 23:26] 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/66819

2773 Hema Sridharan	2009-02-19
      BUG#40849.Most of the backup tests from suite are replaced to use BACKUPDIR instead of using DATADIR.
      This will help in reducing tests fail when there will be chnages in assumptions for usage of DATADIR.
[20 Feb 2009 22: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/67067

2774 Hema Sridharan	2009-02-20
      BUG#40849. Most of the backup tests from backup suite and backup engines suite are replaced to use backupdir instead of datadir. This will help to reduce test failures when there are changes in assumptions in usage of datadir.
[23 Feb 2009 9:08] Jørgen Løland
Good to push
[24 Feb 2009 18:33] Chuck Bell
Patch approved
[24 Feb 2009 20:58] 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/67420

2781 Hema Sridharan	2009-02-24
      BUG#40849.
      Most of the backup tests from backup suite and backup engines suite are
      replaced to use backupdir instead of datadir.
      This will help to reduce test failures when there are changes in assumptions
      in usage od datadir.
[26 Mar 2009 12:34] Bugs System
Pushed into 6.0.11-alpha (revid:alik@sun.com-20090326121822-pt84kzxxayzho4mn) (version source revid:rafal.somla@sun.com-20090302164601-znhm4tadplfi2iqu) (merge vers: 6.0.11-alpha) (pib:6)
[26 Mar 2009 18:09] Paul DuBois
Test case changes. No changelog entry needed.