Skip to content

Commit d3db87e

Browse files
author
Arun Kuruvila
committed
Merge branch 'mysql-5.6' into mysql-5.7
2 parents 3eeb79d + 10c68a7 commit d3db87e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

storage/myisam/mi_locking.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -102,6 +102,9 @@ int mi_lock_database(MI_INFO *info, int lock_type)
102102
share->changed=0;
103103
if (myisam_flush)
104104
{
105+
if (share->file_map)
106+
my_msync(info->dfile, share->file_map, share->mmaped_length, MS_SYNC);
107+
105108
if (mysql_file_sync(share->kfile, MYF(0)))
106109
error= my_errno();
107110
if (mysql_file_sync(info->dfile, MYF(0)))
@@ -449,6 +452,8 @@ int _mi_writeinfo(MI_INFO *info, uint operation)
449452
#ifdef _WIN32
450453
if (myisam_flush)
451454
{
455+
if (share->file_map)
456+
my_msync(info->dfile, share->file_map, share->mmaped_length, MS_SYNC);
452457
mysql_file_sync(share->kfile, 0);
453458
mysql_file_sync(info->dfile, 0);
454459
}

0 commit comments

Comments
 (0)