From: Date: March 28 2007 6:09pm Subject: bk commit into 5.0 tree (svoj:1.2486) BUG#25521 List-Archive: http://lists.mysql.com/commits/23138 X-Bug: 25521 Message-Id: <20070328160921.3B09FBB1@april.pils.ru> Below is the list of changes that have just been committed into a local 5.0 repository of svoj. When svoj 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-03-28 21:09:16+05:00, svoj@stripped +1 -0 BUG#25521 - optimize table, delete, show table status leads to table losing it's .MYD When OPTIMIZE TABLE is completed it attempts to rename temporary file to original name. This step may fail on windows when a file is opened. As a result data file might be deleted and optimized copy of file (table_name.MYD) remains. This situation is handled properly by my_delete_allow_opened, so use it instead of my_delete when attempting to rename a file on windows. No suitable test case for this bug. mysys/my_redel.c@stripped, 2007-03-28 21:09:14+05:00, svoj@stripped +1 -1 Attempting to delete an opened file and to immediately create a new one with the same name may result in my_redel failure on windows. It may fail because file is not deleted until it is closed. This situation is handled properly by my_delete_allow_opened, so use it instead of my_delete. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: svoj # Host: april.(none) # Root: /home/svoj/devel/mysql/BUG25521/mysql-5.0-engines --- 1.11/mysys/my_redel.c 2007-03-28 21:09:21 +05:00 +++ 1.12/mysys/my_redel.c 2007-03-28 21:09:21 +05:00 @@ -60,7 +60,7 @@ int my_redel(const char *org_name, const MyFlags)) goto end; } - else if (my_delete(org_name,MyFlags)) + else if (my_delete_allow_opened(org_name, MyFlags)) goto end; if (my_rename(tmp_name,org_name,MyFlags)) goto end;