From: Date: November 22 2007 9:39pm Subject: bk commit into 5.1 tree (istruewing:1.2622) BUG#26379 List-Archive: http://lists.mysql.com/commits/38311 X-Bug: 26379 Message-Id: Below is the list of changes that have just been committed into a local 5.1 repository of istruewing. When istruewing does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-11-22 21:39:28+01:00, istruewing@stripped +1 -0 Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table Post-pushbuild fix. The merge test failed on Windows. The MoveFile() function returned the error code ERROR_ACCESS_DENIED. The fix is to use a different name for the file to be deleted. This is the same trick as we use for the error code ERROR_ALREADY_EXISTS. Added ERROR_ACCESS_DENIED to the list of error codes that require to change the name of the file to be deleted. mysys/my_delete.c@stripped, 2007-11-22 21:39:27+01:00, istruewing@stripped +7 -3 Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table Added ERROR_ACCESS_DENIED to the list of error codes that require to change the name of the file to be deleted. diff -Nrup a/mysys/my_delete.c b/mysys/my_delete.c --- a/mysys/my_delete.c 2006-12-23 20:04:07 +01:00 +++ b/mysys/my_delete.c 2007-11-22 21:39:27 +01:00 @@ -56,16 +56,20 @@ int nt_share_delete(const char *name, my ulong cnt; DBUG_ENTER("nt_share_delete"); DBUG_PRINT("my",("name %s MyFlags %d", name, MyFlags)); - + for (cnt= GetTickCount(); cnt; cnt--) { sprintf(buf, "%s.%08X.deleted", name, cnt); if (MoveFile(name, buf)) break; - + if ((errno= GetLastError()) == ERROR_ALREADY_EXISTS) continue; - + + /* This happened during tests with MERGE tables. */ + if (errno == ERROR_ACCESS_DENIED) + continue; + DBUG_PRINT("warning", ("Failed to rename %s to %s, errno: %d", name, buf, errno)); break;