os0file.c:

  Prevent on Windows starting of two mysqld instances on SAME InnoDB files: that could cause severe database corruption
parent 39660b1f
...@@ -386,9 +386,9 @@ try_again: ...@@ -386,9 +386,9 @@ try_again:
file = CreateFile(name, file = CreateFile(name,
access, access,
FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SHARE_READ,
/* file can be read and written /* file can be read also by other
also by other processes */ processes */
NULL, /* default security attributes */ NULL, /* default security attributes */
create_flag, create_flag,
attributes, attributes,
...@@ -526,9 +526,14 @@ try_again: ...@@ -526,9 +526,14 @@ try_again:
file = CreateFile(name, file = CreateFile(name,
GENERIC_READ | GENERIC_WRITE, /* read and write GENERIC_READ | GENERIC_WRITE, /* read and write
access */ access */
FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SHARE_READ,/* File can be read also by other
/* file can be read and written processes; we must give the read
also by other processes */ permission because of ibbackup. We do
not give the write permission to
others because if one would succeed to
start 2 instances of mysqld on the
SAME files, that could cause severe
database corruption! */
NULL, /* default security attributes */ NULL, /* default security attributes */
create_flag, create_flag,
attributes, attributes,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment