#At file:///localhome/jl208045/mysql/mysql-6.0-backup-reenable/
2765 Jorgen Loland 2009-02-11
Bug#41008 - backup_no_data and backup_ddl_blocker fails: union.test doesn't cleanup files
Patch makes union.test remove files it has created.
modified:
mysql-test/suite/backup/t/backup_no_data.test
mysql-test/suite/backup/t/disabled.def
mysql-test/t/union.test
per-file messages:
mysql-test/suite/backup/t/backup_no_data.test
Get datadir from server instead of assuming path.
mysql-test/suite/backup/t/disabled.def
Disable backup_no_data and backup_ddl_blocker due to bug 42756
mysql-test/t/union.test
Cleanup files the test has created
=== modified file 'mysql-test/suite/backup/t/backup_no_data.test'
--- a/mysql-test/suite/backup/t/backup_no_data.test 2008-12-06 00:24:23 +0000
+++ b/mysql-test/suite/backup/t/backup_no_data.test 2009-02-11 12:15:12 +0000
@@ -1,8 +1,10 @@
--source include/not_embedded.inc
+let $MYSQLD_DATADIR= `select @@datadir`;
+
--disable_warnings
---rmdir $MYSQLTEST_VARDIR/master-data/test
---mkdir $MYSQLTEST_VARDIR/master-data/test
+--rmdir $MYSQLD_DATADIR/test
+--mkdir $MYSQLD_DATADIR/test
DROP DATABASE IF EXISTS empty_db;
DROP DATABASE IF EXISTS other_db;
--enable_warnings
=== modified file 'mysql-test/suite/backup/t/disabled.def'
--- a/mysql-test/suite/backup/t/disabled.def 2008-12-29 12:06:48 +0000
+++ b/mysql-test/suite/backup/t/disabled.def 2009-02-11 12:15:12 +0000
@@ -11,6 +11,6 @@
##############################################################################
backup_no_engine : Bug#36021 2008-04-13 rsomla server crashes when openning table with unknown storage engine
backup_triggers_and_events : Bug#37762 2008-07-01 rafal Test fails on remove_file for unknown reasons
-backup_no_data : Bug#41008 2008-12-08 alik union.test does not cleanup
-backup_ddl_blocker : Bug#41008 2008-12-08 alik union.test does not cleanup
backup_views : Bug#41360 2008-12-10 ingo Test fails after merge of main and backup trees
+backup_no_data : Bug#42756 2009-02-11 jorgen Test db state not preserved
+backup_ddl_blocker : Bug#42756 2009-02-11 jorgen Test db state not preserved
=== modified file 'mysql-test/t/union.test'
--- a/mysql-test/t/union.test 2008-12-09 14:22:54 +0000
+++ b/mysql-test/t/union.test 2009-02-11 12:15:12 +0000
@@ -6,6 +6,8 @@
drop table if exists t1,t2,t3,t4,t5,t6;
--enable_warnings
+let $MYSQLD_DATADIR = `select @@datadir`;
+
CREATE TABLE t1 (a int not null, b char (10) not null);
insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
CREATE TABLE t2 (a int not null, b char (10) not null);
@@ -1036,3 +1038,10 @@ SELECT ( SELECT a UNION SELECT a ) INTO
SELECT ( SELECT a UNION SELECT a ) INTO DUMPFILE 'union.out.file4' FROM t1;
DROP TABLE t1;
+
+--remove_file $MYSQLD_DATADIR/test/union.out.file
+--remove_file $MYSQLD_DATADIR/test/union.out.file2
+--remove_file $MYSQLD_DATADIR/test/union.out.file3
+--remove_file $MYSQLD_DATADIR/test/union.out.file4
+--remove_file $MYSQLD_DATADIR/test/union.out.file5
+--remove_file $MYSQLD_DATADIR/test/union.out.file6