Commit a18c4883 authored by unknown's avatar unknown

os0file.c:

  Prevent on Windows starting of two mysqld instances on SAME InnoDB files: that could cause severe database corruption


innobase/os/os0file.c:
  Prevent on Windows starting of two mysqld instances on SAME InnoDB files: that could cause severe database corruption
parent 87473e96
...@@ -386,9 +386,9 @@ os_file_create_simple( ...@@ -386,9 +386,9 @@ os_file_create_simple(
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 @@ os_file_create( ...@@ -526,9 +526,14 @@ os_file_create(
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