Bug #27892 Test 'merge' fail on windows
Submitted: 17 Apr 2007 16:34 Modified: 17 Apr 2007 16:58
Reporter: Geoffroy Cogniaux Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1.17 OS:Windows (XP SP2 )
Assigned to: CPU Architecture:Any
Tags: merge

[17 Apr 2007 16:34] Geoffroy Cogniaux
Test 'merge' fails on Windows

TEST                           RESULT         TIME (ms)

merge                          [ fail ]

Errors are (from j:/_devel/_MySQL/src/mysql-5.1.17-beta/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 477: query 'drop table t2' failed: 6: Error on delete of '.\test\t2.MYI' (Errcode: 13)
(the last lines may be the most important ones)

How to repeat:
build with MSVC8 from source code mysql-5.1.17-beta.tar.gz
bash cygwin shell : ./mysql-test-run.pl --do-test=merge
[17 Apr 2007 16:58] MySQL Verification Team
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at


$ ./mysql-test-run.pl --do-test=merge
Logging: ./mysql-test-run.pl --do-test=merge
MySQL Version 5.1.18
Using binlog format 'mixed'
Disable Instance manager - testing not supported on Windows
Skipping ndbcluster, mysqld not compiled with ndbcluster
Setting mysqld to support SSL connections
Using MTR_BUILD_THREAD      = 0
Using MASTER_MYPORT         = 9306
Using MASTER_MYPORT1        = 9307
Using SLAVE_MYPORT          = 9308
Using SLAVE_MYPORT1         = 9309
Using SLAVE_MYPORT2         = 9310
Killing Possible Leftover Processes
Removing Stale Files
Creating Directories
Installing Master Database
Installing Master Database
Starting Tests in the 'main' suite

TEST                           RESULT         TIME (ms)

merge                          [ pass ]          10938
Stopping All Servers
All 1 tests were successful.
The servers where restarted 1 times
Spent 10.938 seconds actually executing testcases
[7 Nov 2007 4:22] Zhenxing He
This bug still exists in mysql-5.1.22-rc and mysql-5.1 bk, there is a knowing problem with MERGE table that if the MERGE table is opened, dropping a table that is used by the MERGE table will fail on windows system because the it's not allowed to delete open files on windows. In order to overcome this problem a FLUSH TABLES should be issued before dropping any tables used by MERGE table.

--- mysql-5.1.22-rc/mysql-test/t/merge.test.orig        2007-11-07 11:09:59.000000000 +0800
+++ mysql-5.1.22-rc/mysql-test/t/merge.test     2007-11-07 11:10:21.000000000 +0800
@@ -487,6 +487,7 @@
 alter table t1 insert_method = no;
 insert into t1 values (1);
+flush tables;
 drop table t2;
 drop table t1;