summaryrefslogtreecommitdiff
path: root/mysys/my_copy.c
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-06-02 00:03:16 +0300
committermonty@hundin.mysql.fi <>2001-06-02 00:03:16 +0300
commite30ff2ece115ebd2333d7021cf04f0dfb41323dc (patch)
treedaa8be0909526f70ad0e41daf9d281673f2ca826 /mysys/my_copy.c
parentdd83beb76a2fa7a1954599361f7a348e7235242a (diff)
downloadmariadb-git-e30ff2ece115ebd2333d7021cf04f0dfb41323dc.tar.gz
Fixed bug that caused client to hang because mysqld never did send an
error message if the table open or the index creation failed. Updated portuguese error messages. Fix for OS/2 that affected CHECK TABLE.
Diffstat (limited to 'mysys/my_copy.c')
-rw-r--r--mysys/my_copy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_copy.c b/mysys/my_copy.c
index bfd7e957585..be131873118 100644
--- a/mysys/my_copy.c
+++ b/mysys/my_copy.c
@@ -54,7 +54,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */
new_file_stat=stat((char*) to, &new_stat_buff);
- if ((from_file=my_open(from,O_RDONLY,MyFlags)) >= 0)
+ if ((from_file=my_open(from,O_RDONLY | O_SHARE,MyFlags)) >= 0)
{
if (stat(from,&stat_buff))
{
@@ -64,7 +64,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
stat_buff=new_stat_buff;
if ((to_file= my_create(to,(int) stat_buff.st_mode,
- O_WRONLY | O_TRUNC | O_BINARY,
+ O_WRONLY | O_TRUNC | O_BINARY | O_SHARE,
MyFlags)) < 0)
goto err;