Description:
When you run the test backup_no_data more than once per test run, every other run fails. Data is not being cleaned up properly.
How to repeat:
Run this:
./mysql-test-run.pl backup_no_data backup_no_data backup_no_data backup_no_data backup_no_data backup_no_data --force
and see this:
=======================================================
TEST RESULT TIME (ms)
-------------------------------------------------------
main.backup_no_data [ pass ] 0
main.backup_no_data [ fail ]
cp: cannot stat `c:/source/c++/mysql-6.0_BUG_31383/mysql-test/var/master-data/te
st/t1.MYD': No such file or directory
cp: cannot stat `c:/source/c++/mysql-6.0_BUG_31383/mysql-test/var/master-data/te
st/t1.MYI': No such file or directory
mysqltest: At line 7: command "cp -rf $MYSQLTEST_VARDIR/master-data/test $MYSQLT
EST_VARDIR/test.orig" failed
The result from queries just before the failure was:
exec of 'cp -rf c:/source/c++/mysql-6.0_BUG_31383/mysql-test/var/master-data/tes
t c:/source/c++/mysql-6.0_BUG_31383/mysql-test/var/test.orig' failed, error: 1,
status: 1, errno: 0
More results from queries before failure can be found in c:\source\c++\mysql-6.0
_BUG_31383\mysql-test\var\log\backup_no_data.log
Stopping All Servers
Restoring snapshot of databases
Resuming Tests
main.backup_no_data [ pass ] 0
main.backup_no_data [ fail ]
cp: cannot stat `c:/source/c++/mysql-6.0_BUG_31383/mysql-test/var/master-data/te
st/t1.MYD': No such file or directory
cp: cannot stat `c:/source/c++/mysql-6.0_BUG_31383/mysql-test/var/master-data/te
st/t1.MYI': No such file or directory
mysqltest: At line 7: command "cp -rf $MYSQLTEST_VARDIR/master-data/test $MYSQLT
EST_VARDIR/test.orig" failed
The result from queries just before the failure was:
exec of 'cp -rf c:/source/c++/mysql-6.0_BUG_31383/mysql-test/var/master-data/tes
t c:/source/c++/mysql-6.0_BUG_31383/mysql-test/var/test.orig' failed, error: 1,
status: 1, errno: 0
More results from queries before failure can be found in c:\source\c++\mysql-6.0
_BUG_31383\mysql-test\var\log\backup_no_data.log
Stopping All Servers
Restoring snapshot of databases
Resuming Tests
Suggested fix:
Change the preamble of the test to setup the data correctly (may be ok asis) and fix the cleanup code to destroy only what is necessary. Also, the older methods are used e.g. cp, rm and should be changed to the new test commands.