diff options
author | aivanov@mysql.com <> | 2006-06-28 10:21:01 +0400 |
---|---|---|
committer | aivanov@mysql.com <> | 2006-06-28 10:21:01 +0400 |
commit | 7dc30c68f4cd3c14fb9b1262f4abf01a31d575c3 (patch) | |
tree | a5aaebddd57384d10e4d79dbbdbc2976733af0ed /include/my_sys.h | |
parent | 6839e64298dc2333a18e9d220371aa75e2ca8951 (diff) | |
download | mariadb-git-7dc30c68f4cd3c14fb9b1262f4abf01a31d575c3.tar.gz |
Fixing BUG#17719 "Delete of binlog files fails on Windows"
and BUG#19208 "Test 'rpl000017' hangs on Windows".
Both bugs are caused by attempting to delete an opened
file and to create immediatedly a new one with the same
name. On Windows it can be supported only on NT-platforms
(by using FILE_SHARE_DELETE mode and with renaming the
file before deletion). Because deleting not-closed files
is not supported on all platforms (e.g. Win 98|ME) this
is to be considered harmful and should be eliminated by
a "code redesign".
Diffstat (limited to 'include/my_sys.h')
-rw-r--r-- | include/my_sys.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 229389f1ac5..6457113d282 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -541,6 +541,7 @@ typedef int (*Process_option_func)(void *ctx, const char *group_name, #include <my_alloc.h> + /* Prototypes for mysys and my_func functions */ extern int my_copy(const char *from,const char *to,myf MyFlags); @@ -613,6 +614,13 @@ extern File my_sopen(const char *path, int oflag, int shflag, int pmode); #endif extern int check_if_legal_filename(const char *path); +#if defined(__WIN__) && defined(__NT__) +extern int nt_share_delete(const char *name,myf MyFlags); +#define my_delete_allow_opened(fname,flags) nt_share_delete((fname),(flags)) +#else +#define my_delete_allow_opened(fname,flags) my_delete((fname),(flags)) +#endif + #ifndef TERMINATE extern void TERMINATE(FILE *file); #endif |