summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-02-06 14:50:50 +0100
committerSergei Golubchik <serg@mariadb.org>2018-02-06 14:50:50 +0100
commit4771ae4b22d2bdef0aafc563570c71d4636a2493 (patch)
treed115bd7c68b1e6feab68ff6fcd547e0c86c79296 /storage/myisam
parent60f51af755ea9d07c20a596ba21de184816fa265 (diff)
parent0c25e58db6b045df92c209d396031cac5b528bbf (diff)
downloadmariadb-git-4771ae4b22d2bdef0aafc563570c71d4636a2493.tar.gz
Merge branch 'github/10.1' into 10.2
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/mi_locking.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/storage/myisam/mi_locking.c b/storage/myisam/mi_locking.c
index 1921926463e..4fd287c6038 100644
--- a/storage/myisam/mi_locking.c
+++ b/storage/myisam/mi_locking.c
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 2000, 2010, Oracle and/or its affiliates
+/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2009, 2018, MariaDB Corporation
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -113,6 +113,8 @@ int mi_lock_database(MI_INFO *info, int lock_type)
share->changed=0;
if (myisam_flush)
{
+ if (share->file_map)
+ my_msync(info->dfile, share->file_map, share->mmaped_length, MS_SYNC);
if (mysql_file_sync(share->kfile, MYF(0)))
mark_crashed= error= my_errno;
if (mysql_file_sync(info->dfile, MYF(0)))
@@ -526,6 +528,8 @@ int _mi_writeinfo(register MI_INFO *info, uint operation)
#ifdef _WIN32
if (myisam_flush)
{
+ if (share->file_map)
+ my_msync(info->dfile, share->file_map, share->mmaped_length, MS_SYNC);
mysql_file_sync(share->kfile, 0);
mysql_file_sync(info->dfile, 0);
}