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(
file = CreateFile(name,
access,
FILE_SHARE_READ | FILE_SHARE_WRITE,
/* file can be read and written
also by other processes */
FILE_SHARE_READ,
/* file can be read also by other
processes */
NULL, /* default security attributes */
create_flag,
attributes,
......@@ -526,9 +526,14 @@ os_file_create(
file = CreateFile(name,
GENERIC_READ | GENERIC_WRITE, /* read and write
access */
FILE_SHARE_READ | FILE_SHARE_WRITE,
/* file can be read and written
also by other processes */
FILE_SHARE_READ,/* File can be read also by other
processes; we must give the read
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 */
create_flag,
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