Commit 60bd353b authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fixes for atomic writes on Windows.

Windows does atomic writes, as long as they are aligned and multiple
of sector size. this is documented in MSDN.

Fix innodb.doublewrite test to always use doublewrite buffer,
(even if atomic writes are autodetected)
parent 59a266a9
[strict_crc32]
--innodb-checksum-algorithm=strict_crc32
--innodb-use-atomic-writes=0
[strict_full_crc32]
--innodb-checksum-algorithm=strict_full_crc32
--innodb-use-atomic-writes=0
......@@ -15,7 +15,7 @@
#include "mysys_priv.h"
my_bool my_may_have_atomic_write= 0;
my_bool my_may_have_atomic_write= IF_WIN(1,0);
#ifdef __linux__
......
......@@ -7669,7 +7669,15 @@ void fil_node_t::find_metadata(os_file_t file
&& my_test_if_atomic_write(file,
space->physical_size())
#else
/* On Windows, all single sector writes are atomic,
as per WriteFile() documentation on MSDN.
We also require SSD for atomic writes, eventhough
technically it is not necessary- the reason is that
on hard disks, we still want the benefit from
(non-atomic) neighbor page flushing in the buffer
pool code. */
&& srv_page_size == block_size
&& on_ssd
#endif
;
}
......
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