Commit 0c8582b3 authored by unknown's avatar unknown

On windows, delete any conflicting 'to' files on rename(from,to)

This fixes a bug with REPAIR TABLE t1 USE_FRM on windows.


mysys/my_rename.c:
  On windows, delete any conflicting 'to' files on rename(from,to)
parent 697f939e
......@@ -46,6 +46,13 @@ int my_rename(const char *from, const char *to, myf MyFlags)
}
#endif
#if defined(HAVE_RENAME)
#ifdef __WIN__
/*
On windows we can't rename over an existing file:
Remove any conflicting files:
*/
(void) my_delete(to, MYF(0));
#endif
if (rename(from,to))
#else
if (link(from, to) || unlink(from))
......
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