List:Internals« Previous MessageNext Message »
From:Sinisa Milivojevic Date:December 4 2000 12:43pm
Subject:Re: mysql-3.23.28 NT, binary files opened as read-only
View as plain text  
Roger Larsson wrote:

> Hi,
> I've noticed taht as of 3.23.28 all binary files are created as
> read-only under Windows NT. The problem is the call to open()
> under NT, if O_CREAT is specified, the third parameter (pmode) to
> open() is mandatory. If the file does already exist, the parameter is
> ignored. I assume it is not intentional to create the files as
> read-only.
> 
> I suggest the patch below.
> 
> Best regards,
> /Roger Larsson
> 
> *** E:\TEMP\my_open.cdDAQBA    Sun Dec 03 22:25:02 2000
> --- E:\TEMP\my_open.c.savedDAdLG    Sun Dec 03 22:25:02 2000
> ***************
> *** 17,23 ****
> 
>  #define USES_TYPES
>  #include "mysys_priv.h"
> - #include <my_dir.h>
>  #include "mysys_err.h"
>  #include <errno.h>
>  #if defined(MSDOS) || defined(__WIN__)
> --- 17,22 ----
> ***************
> *** 37,47 ****
>             FileName, Flags, MyFlags));
>  #if defined(MSDOS) || defined(__WIN__)
>    if (Flags & O_SHARE)
> !     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,
> !               MY_S_IREAD | MY_S_IWRITE);
>  #elif !defined(NO_OPEN_3)
>    fd = open(FileName, Flags, my_umask);    /* Normal unix */
>  #else
> --- 36,44 ----
>             FileName, Flags, MyFlags));
>  #if defined(MSDOS) || defined(__WIN__)
>    if (Flags & O_SHARE)
> !     fd = sopen((my_string) FileName, (Flags & ~O_SHARE) | O_BINARY, 
> SH_DENYNO);
>    else
> !     fd = open((my_string) FileName, Flags | O_BINARY);
>  #elif !defined(NO_OPEN_3)
>    fd = open(FileName, Flags, my_umask);    /* Normal unix */
>  #else
> 
> 
> _____________________________________________________________________________________
> 
> 
> Get more from the Web.  FREE MSN Explorer download : 
> http://explorer.msn.com
> 
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail 
> internals-thread177@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail internals-unsubscribe@stripped instead.
> 
> 
Thanks,

We shall take a look at it.





Regards,

Sinisa

      ____  __     _____   _____  ___     ==  MySQL AB
     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic
    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus
  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____
  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
             /*/             \*\                Developers Team

Thread
mysql-3.23.28 NT, binary files opened as read-onlyRoger Larsson3 Dec
  • Re: mysql-3.23.28 NT, binary files opened as read-onlySinisa Milivojevic4 Dec
  • Re: mysql-3.23.28 NT, binary files opened as read-onlySasha Pachev4 Dec
  • mysql-3.23.28 NT, binary files opened as read-onlyMichael Widenius5 Dec
  • Compile optionsAntony T Curtis5 Dec
    • Compile optionsMichael Widenius12 Dec