mariadb/storage
Arun Kuruvila bd1fe2613a Bug #26880757: MYISAM_USE_MMAP=1 ON WINDOWS FREQUENTLY DOES
NOT UPDATE FILE ON DISK

Description:- When the server variable, "myisam_use_mmap" is
enabled, MyISAM tables on windows are not updating the file
on disk even when the server variable "flush" is set to 1.
This is inturn making the table corrupted when encountering
a power failure.

Analysis:- When the server variable "myisam_use_mmap" is set,
files of MyISAM tables will be memory mapped using the OS
APIs mmap()/munmap()/msync() on Unix and CreateFileMapping()
/UnmapViewOfFile()/FlushViewOfFile() on Windows. msync() and
FlushViewOfFile() is responsible for flushing the changes
made to the in-core copy of a file that was mapped into
memory using mmap()/CreateFileMapping() back to the
file system.  FLUSH is determined by the OS unless
explicitly called using msync()/FlushViewOfFile().

When the server variables "myisam_use_mmap" and "flush" are
enabled, MyISAM is only flushing the files from file system
cache to disc using "mysql_file_sync()" and not the memory
mapped file from memory to FS cache using "my_msync()".
["my_msync()" inturn calls  msync() on Unix and
FlushViewOfFile() on Windows.

Fix:- As part of the fix, if server variable
"myisam_use_mmap" is enabled along with  "flush",
"my_msync()" is invoked to flush the data in memory to file
system cache and followed by "mysql_file_sync()" which will
flush the data from file system cache to disk.
2017-10-26 18:07:36 +05:30
..
archive Description: When we execute a correlated subquery on an 2014-04-10 11:10:31 +05:30
blackhole Merge 5.5.24 back into main 5.5. 2012-05-07 22:20:42 +02:00
csv Updated/added copyright headers 2012-02-16 10:48:16 +01:00
example Updated/added copyright headers 2014-01-06 10:52:35 +05:30
federated 2016-02-23 12:10:41 +05:30
heap Bug#18463911 : SERVER CRASHES ON CREATING A TEMP TABLE WITH 2014-06-26 10:08:55 +05:30
innobase Bug #25167032 CRASH WHEN ASSIGNING MY_ERRNO - MISSING 2017-01-06 19:48:54 +05:30
myisam Bug #26880757: MYISAM_USE_MMAP=1 ON WINDOWS FREQUENTLY DOES 2017-10-26 18:07:36 +05:30
myisammrg BUG#20574550 MAIN.MERGE TEST CASE FAILS IF BINLOG_FORMAT=ROW 2016-02-26 09:01:49 +05:30
ndb Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
perfschema Bug#21374104 SETUP_TIMERS INITIALIZATION ASSUMES CYCLE TIMER IS ALWAYS AVAILABLE 2015-07-10 20:42:33 +02:00