diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-02-22 17:17:00 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-02-22 22:29:56 +0200 |
commit | ec4cf111c0d8599c63c486dd96b180d5e7cff8ea (patch) | |
tree | 7e23c566d0b4579b0df6d766f6ad5994b481467b /cmake | |
parent | e1e920bf63550304eccee057edc568479ecf79ac (diff) | |
download | mariadb-git-ec4cf111c0d8599c63c486dd96b180d5e7cff8ea.tar.gz |
MDEV-11520 after-merge fix for 10.1: Use sparse files.
If page_compression (introduced in MariaDB Server 10.1) is enabled,
the logical action is to not preallocate space to the data files,
but to only logically extend the files with zeroes.
fil_create_new_single_table_tablespace(): Create smaller files for
ROW_FORMAT=COMPRESSED tables, but adhere to the minimum file size of
4*innodb_page_size.
fil_space_extend_must_retry(), os_file_set_size(): On Windows,
use SetFileInformationByHandle() and FILE_END_OF_FILE_INFO,
which depends on bumping _WIN32_WINNT to 0x0600.
FIXME: The files are not yet set up as sparse, so
this will currently end up physically extending (preallocating)
the files, wasting storage for unused pages.
os_file_set_size(): Add the parameter "bool sparse=false" to declare
that the file is to be extended logically, instead of being preallocated.
The only caller with sparse=true is
fil_create_new_single_table_tablespace().
(The system tablespace cannot be created with page_compression.)
fil_space_extend_must_retry(), os_file_set_size(): Outside Windows,
use ftruncate() to extend files that are supposed to be sparse.
On systems where ftruncate() is limited to files less than 4GiB
(if there are any), fil_space_extend_must_retry() retains the
old logic of physically extending the file.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/os/Windows.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake index 36bdc0889e6..67108132d8a 100644 --- a/cmake/os/Windows.cmake +++ b/cmake/os/Windows.cmake @@ -50,7 +50,7 @@ IF(CMAKE_C_COMPILER MATCHES "icl") ENDIF() ADD_DEFINITIONS(-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE) -ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) +ADD_DEFINITIONS(-D_WIN32_WINNT=0x0600) # We do not want the windows.h macros min/max ADD_DEFINITIONS(-DNOMINMAX) # Speed up build process excluding unused header files |