Bug #41008 backup_no_data and backup_ddl_blocker fails: union.test doesn't cleanup files
Submitted: 25 Nov 2008 13:03 Modified: 26 Mar 2009 18:10
Reporter: Gleb Shchepa Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:6.0 OS:Any
Assigned to: Jørgen Løland CPU Architecture:Any
Tags: disabled

[25 Nov 2008 13:03] Gleb Shchepa
Description:
backup_ddl_blocker.test fails under PB with a message:

mysqltest: At line 1064: query 'RESTORE FROM "bup_ddl_blocker.bak" OVERWRITE' failed: 1682: Could not restore database `test`

This test was disabled as a problem of bugfix for #17823, but it is incorrect.
It is a problem of union.test cleanups: see bugfix for bug #32858, its test suite creates files union.out.file, union.out.file2, union.out.file3, union.out.file4, union.out.file5 and union.out.file6, but it never cleans them up.

backup_ddl_blocker works fine if we skip union.test.

How to repeat:
enable backup_ddl_blocker.test in suite/backup/t/disabled.def and run:

mysql-test $ ./mtr union.test backup_ddl_blocker.test

=======================================================

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

main.union                     [ pass ]           1654
backup.backup_ddl_blocker      [ fail ]

mysqltest: At line 1064: query 'RESTORE FROM "bup_ddl_blocker.bak" OVERWRITE' failed: 1682: Could not restore database `test`

Suggested fix:
=== modified file 'mysql-test/t/union.test'
--- old/mysql-test/t/union.test	2008-09-15 14:06:56 +0000
+++ new/mysql-test/t/union.test	2008-11-25 13:02:57 +0000
@@ -1031,4 +1031,10 @@ SELECT ( SELECT a UNION SELECT a ) INTO 
 SELECT ( SELECT a UNION SELECT a ) INTO OUTFILE  'union.out.file3' FROM t1;
 SELECT ( SELECT a UNION SELECT a ) INTO DUMPFILE 'union.out.file4' FROM t1;
 
+--remove_file $MYSQLTEST_VARDIR/master-data/test/union.out.file
+--remove_file $MYSQLTEST_VARDIR/master-data/test/union.out.file2
+--remove_file $MYSQLTEST_VARDIR/master-data/test/union.out.file3
+--remove_file $MYSQLTEST_VARDIR/master-data/test/union.out.file4
+--remove_file $MYSQLTEST_VARDIR/master-data/test/union.out.file5
+--remove_file $MYSQLTEST_VARDIR/master-data/test/union.out.file6
 DROP TABLE t1;
[25 Nov 2008 17:01] MySQL Verification Team
Thank you for the bug report.

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

main.union                     [ pass ]           1997
backup.backup_ddl_blocker      [ fail ]
[26 Nov 2008 14:47] Gleb Shchepa
backup_no_data.test is also affected like backup_ddl_blocker.test
[8 Dec 2008 11:07] Alexander Nozdrin
The following tests are disabled due to this bug:
  - backup/backup_no_data.test
  - backup_ddl_blocker.test

The tests were disabled before this bug due to Bug#17823.
At some point Bug#17823 got closed, but the tests still
don't pass as expected.
[11 Feb 2009 12:14] 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/65892

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.
[11 Feb 2009 14:05] Chuck Bell
Patch approved. Only one reviewer needed.
[26 Mar 2009 12:33] 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:10] Paul DuBois
Test case changes. No changelog entry needed.