summaryrefslogtreecommitdiff
path: root/mysys/my_open.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-12-05 03:00:31 +0200
committerunknown <monty@donna.mysql.com>2000-12-05 03:00:31 +0200
commitb39c6f9a35241827664e790ca9a7cb8667c01b58 (patch)
treefbf31f212931d0d73137cbc1322b0a3a0b20a116 /mysys/my_open.c
parentc3f87de4254f0a96bd425891249812b2b62819d6 (diff)
downloadmariadb-git-b39c6f9a35241827664e790ca9a7cb8667c01b58.tar.gz
New error messages
Fix for creating read-only files on windows Manual updates BitKeeper/deleted/.del-acconfig.h~65f1202b3b5c345f: ***MISSING WEAVE*** BitKeeper/deleted/.del-acconfig.h~7b620dbd69ea6074: ***MISSING WEAVE*** Docs/manual.texi: Small clarifications BitKeeper/etc/ignore: Added Docs/manual.aux Docs/manual.cp Docs/manual.cps Docs/manual.dvi Docs/manual.fn Docs/manual.fns Docs/manual.ky Docs/manual.pg Docs/manual.toc Docs/manual.tp Docs/manual.vr Docs/manual_a4.ps Docs/manual_letter.ps to the ignore list mysql-test/chew_on_this/select.res: ***MISSING WEAVE*** mysys/my_open.c: Fix for windows where some files where created read only sql/ha_myisam.cc: Added 'checking table' to process-list status sql/opt_range.cc: Cleanup sql/share/czech/errmsg.sys: New error messages sql/share/czech/errmsg.txt: New error messages sql/share/italian/errmsg.sys: New error messages sql/share/italian/errmsg.txt: New error messages
Diffstat (limited to 'mysys/my_open.c')
-rw-r--r--mysys/my_open.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mysys/my_open.c b/mysys/my_open.c
index aadf197d2cb..a8dbe86989b 100644
--- a/mysys/my_open.c
+++ b/mysys/my_open.c
@@ -18,6 +18,7 @@
#define USES_TYPES
#include "mysys_priv.h"
#include "mysys_err.h"
+#include <my_dir.h>
#include <errno.h>
#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__)
#include <share.h>
@@ -36,9 +37,11 @@ File my_open(const char *FileName, int Flags, myf MyFlags)
FileName, Flags, MyFlags));
#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__)
if (Flags & O_SHARE)
- fd = sopen((my_string) FileName, (Flags & ~O_SHARE) | O_BINARY, SH_DENYNO);
+ fd = sopen((my_string) FileName, (Flags & ~O_SHARE) | O_BINARY, SH_DENYNO,
+ MY_S_IREAD | MY_S_IWRITE);
else
- fd = open((my_string) FileName, Flags | O_BINARY);
+ fd = open((my_string) FileName, Flags | O_BINARY,
+ MY_S_IREAD | MY_S_IWRITE);
#elif !defined(NO_OPEN_3)
fd = open(FileName, Flags, my_umask); /* Normal unix */
#else