diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-10-06 15:40:26 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-10-06 15:40:26 +0300 |
commit | 21adad000a00a62357c0da63ff9ae98850475618 (patch) | |
tree | c74d82d6651224768ebfa4cb10eca74d6848f114 /configure.cmake | |
parent | 90f2c822469a4f88f882ba8974e790f0fb0b2702 (diff) | |
download | mariadb-git-21adad000a00a62357c0da63ff9ae98850475618.tar.gz |
MDEV-8901: InnoDB: Punch hole is incorrecty done also to log files causing assertion and database corruption
Analysis: Problem is that punch hole does not know the actual page size
of the page and does the page belong to an data file or to a log file.
Fix: Pass down the file type and page size to os layer to be used
when trim is called. Also fix unsafe null pointer access to
actual write_size.
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake index 5efd0f5c14b..1dade02aa32 100644 --- a/configure.cmake +++ b/configure.cmake @@ -1058,3 +1058,22 @@ CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_IN CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN) SET(SPRINTF_RETURNS_INT 1) CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H) + +IF(NOT MSVC) + CHECK_C_SOURCE_RUNS( + " + #define _GNU_SOURCE + #include <fcntl.h> + #include <linux/falloc.h> + int main() + { + /* Ignore the return value for now. Check if the flags exist. + The return value is checked at runtime. */ + fallocate(0, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 0); + + return(0); + }" + HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE + ) +ENDIF() + |