summaryrefslogtreecommitdiff
path: root/storage/xtradb/os/os0file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/os/os0file.cc')
-rw-r--r--storage/xtradb/os/os0file.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc
index 03200fee80b..4f219b18428 100644
--- a/storage/xtradb/os/os0file.cc
+++ b/storage/xtradb/os/os0file.cc
@@ -130,7 +130,7 @@ UNIV_INTERN os_ib_mutex_t os_file_seek_mutexes[OS_FILE_N_SEEK_MUTEXES];
#define OS_AIO_MERGE_N_CONSECUTIVE 64
#ifdef WITH_INNODB_DISALLOW_WRITES
-#define WAIT_ALLOW_WRITES() os_event_wait(srv_allow_writes_event)
+#define WAIT_ALLOW_WRITES() if (!IS_XTRABACKUP()) os_event_wait(srv_allow_writes_event)
#else
#define WAIT_ALLOW_WRITES() do { } while (0)
#endif /* WITH_INNODB_DISALLOW_WRITES */
@@ -1001,7 +1001,6 @@ os_file_lock(
#ifndef UNIV_HOTBACKUP
/****************************************************************//**
Creates the seek mutexes used in positioned reads and writes. */
-static
void
os_io_init_simple(void)
/*===================*/
@@ -1640,6 +1639,10 @@ os_file_create_simple_no_error_handling_func(
return((os_file_t) -1);
}
+ if (IS_XTRABACKUP()) {
+ share_mode |= FILE_SHARE_DELETE | FILE_SHARE_WRITE;
+ }
+
file = CreateFile((LPCTSTR) name,
access,
share_mode,
@@ -1921,7 +1924,10 @@ os_file_create_func(
create_mode &= ~OS_FILE_ON_ERROR_NO_EXIT;
create_mode &= ~OS_FILE_ON_ERROR_SILENT;
-
+ if (srv_backup_mode){
+ /* Permit others to write, while I'm reading. */
+ share_mode |= FILE_SHARE_WRITE;
+ }
if (create_mode == OS_FILE_OPEN_RAW) {
ut_a(!srv_read_only_mode);
@@ -3525,7 +3531,7 @@ os_file_get_status(
fh = CreateFile(
(LPCTSTR) path, // File to open
access,
- 0, // No sharing
+ FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL, // Default security
OPEN_EXISTING, // Existing file only
FILE_ATTRIBUTE_NORMAL, // Normal file