diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-02-20 17:58:42 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-02-21 16:45:03 +0200 |
commit | 978179a9d4933d3d8d2ac99028798e8a07095dd4 (patch) | |
tree | a4f21dbbd812e8c347413f7ead578b1677d08691 /storage/innobase/include/sync0sync.h | |
parent | 2bfe83adec576a27aed2d87ff65cebddc3430d2e (diff) | |
download | mariadb-git-978179a9d4933d3d8d2ac99028798e8a07095dd4.tar.gz |
MDEV-11520 Extending an InnoDB data file unnecessarily allocates
a large memory buffer on Windows
fil_extend_space_to_desired_size(), os_file_set_size(): Use calloc()
for memory allocation, and handle failures. Properly check the return
status of posix_fallocate().
On Windows, instead of extending the file by at most 1 megabyte at a time,
write a zero-filled page at the end of the file.
According to the Microsoft blog post
https://blogs.msdn.microsoft.com/oldnewthing/20110922-00/?p=9573
this will physically extend the file by writing zero bytes.
(InnoDB never uses DeviceIoControl() to set the file sparse.)
For innodb_plugin, port the XtraDB fix for MySQL Bug#56433
(introducing fil_system->file_extend_mutex). The bug was
fixed differently in MySQL 5.6 (and MariaDB Server 10.0).
Diffstat (limited to 'storage/innobase/include/sync0sync.h')
-rw-r--r-- | storage/innobase/include/sync0sync.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h index bc8d0d27be3..f074ca2f189 100644 --- a/storage/innobase/include/sync0sync.h +++ b/storage/innobase/include/sync0sync.h @@ -675,6 +675,7 @@ or row lock! */ #define SYNC_BUF_BLOCK 146 /* Block mutex */ #define SYNC_BUF_FLUSH_LIST 145 /* Buffer flush list mutex */ #define SYNC_DOUBLEWRITE 140 +#define SYNC_OUTER_ANY_LATCH 136 #define SYNC_ANY_LATCH 135 #define SYNC_MEM_HASH 131 #define SYNC_MEM_POOL 130 |