Commit 68321feb authored by unknown's avatar unknown

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:
  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.
parent 86421674
...@@ -66,6 +66,10 @@ int nt_share_delete(const char *name, myf MyFlags) ...@@ -66,6 +66,10 @@ int nt_share_delete(const char *name, myf MyFlags)
if ((errno= GetLastError()) == ERROR_ALREADY_EXISTS) if ((errno= GetLastError()) == ERROR_ALREADY_EXISTS)
continue; 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", DBUG_PRINT("warning", ("Failed to rename %s to %s, errno: %d",
name, buf, errno)); name, buf, errno));
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment