summaryrefslogtreecommitdiff
path: root/mysys/my_create.c
diff options
context:
space:
mode:
authorunknown <SergeyV@selena.>2005-11-14 16:01:10 +0300
committerunknown <SergeyV@selena.>2005-11-14 16:01:10 +0300
commit303cae4cd86db752a25836bb743796dd7d71dcf2 (patch)
tree8ad0a87b2049632526ae5cc48281ed997248d76c /mysys/my_create.c
parentb10c7d60bd46135760c59291415c49db6e8d8f71 (diff)
downloadmariadb-git-303cae4cd86db752a25836bb743796dd7d71dcf2.tar.gz
Fixes bug #13377. my_open() & my_create() functions changed to use
my_sopen() on win32 which allows to use FILE_SHARE_DELETE flag to allow deleting opened files. my_sopen() implementation is added to support this functionality. include/my_global.h: Fixes bug #13377. Added number of constants for share delete file open option. include/my_sys.h: Fixes bug #13377. Added my_sopen function. mysys/my_create.c: Fixes bug #13377. my_create() function changed to use my_sopen() and which allows to use FILE_SHARE_DELETE flag on win32, which helps in deleting opened files. mysys/my_open.c: Fixes bug #13377. my_open() function changed to use my_sopen() on win32 which allows to use FILE_SHARE_DELETE flag to allow deleting opened files. sql/log.cc: Fixes bug #13377. Additional patch - remove reference counting for opened binlog files, introduced in initial patch of #13377. sql/sql_class.h: Fixes bug #13377. Additional patch - remove reference counting for opened binlog files, introduced in initial patch of #13377. sql/sql_repl.cc: Fixes bug #13377. Additional patch - remove reference counting for opened binlog files, introduced in initial patch of #13377.
Diffstat (limited to 'mysys/my_create.c')
-rw-r--r--mysys/my_create.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mysys/my_create.c b/mysys/my_create.c
index 5fa97a9ca78..a85417c7701 100644
--- a/mysys/my_create.c
+++ b/mysys/my_create.c
@@ -47,13 +47,16 @@ File my_create(const char *FileName, int CreateFlags, int access_flags,
#elif defined(VMS)
fd = open((my_string) FileName, access_flags | O_CREAT, 0,
"ctx=stm","ctx=bin");
-#elif defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2)
+#elif defined(MSDOS) || defined(__EMX__) || defined(OS2)
if (access_flags & O_SHARE)
fd = sopen((my_string) FileName, access_flags | O_CREAT | O_BINARY,
SH_DENYNO, MY_S_IREAD | MY_S_IWRITE);
else
fd = open((my_string) FileName, access_flags | O_CREAT | O_BINARY,
MY_S_IREAD | MY_S_IWRITE);
+#elif defined(__WIN__)
+ fd= my_sopen((my_string) FileName, access_flags | O_CREAT | O_BINARY,
+ SH_DENYNO, MY_S_IREAD | MY_S_IWRITE);
#else
fd = open(FileName, access_flags);
#endif