diff options
author | Jan Lindström <jan.lindstrom@skysql.com> | 2014-07-25 14:37:10 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@skysql.com> | 2014-07-25 14:37:10 +0300 |
commit | 56c4b016ad5ee7ec994cde8a27934a89259fe670 (patch) | |
tree | ed665eff756282baddb00d09d3a0b26aadbfba14 /storage/innobase/include/os0file.ic | |
parent | 911c4811ded0826386c53a2d6fbbe26a7a304089 (diff) | |
download | mariadb-git-56c4b016ad5ee7ec994cde8a27934a89259fe670.tar.gz |
Fiix random test failures on fil_decompress_page_2 function.
Analysis: InnoDB writes also files that do not contain FIL-header.
This could lead incorrect analysis on os_fil_read_func function
when it tries to see is page page compressed based on FIL_PAGE_TYPE
field on FIL-header. With bad luck uncompressed page that does
not contain FIL-headed, the byte on FIL_PAGE_TYPE position could
indicate that page is page comrpessed.
Fix: Upper layer must indicate is file space page compressed
or not. If this is not yet known, we need to read the FIL-header
and find it out. Files that we know that are not page compressed
we can always just provide FALSE.
Diffstat (limited to 'storage/innobase/include/os0file.ic')
-rw-r--r-- | storage/innobase/include/os0file.ic | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/storage/innobase/include/os0file.ic b/storage/innobase/include/os0file.ic index 9a3c91306c0..8e1cea585e6 100644 --- a/storage/innobase/include/os0file.ic +++ b/storage/innobase/include/os0file.ic @@ -261,6 +261,8 @@ pfs_os_file_read_func( void* buf, /*!< in: buffer where to read */ os_offset_t offset, /*!< in: file offset where to read */ ulint n, /*!< in: number of bytes to read */ + ibool compressed, /*!< in: is this file space + compressed ? */ const char* src_file,/*!< in: file name where func invoked */ ulint src_line)/*!< in: line where the func invoked */ { @@ -271,7 +273,7 @@ pfs_os_file_read_func( register_pfs_file_io_begin(&state, locker, file, n, PSI_FILE_READ, src_file, src_line); - result = os_file_read_func(file, buf, offset, n); + result = os_file_read_func(file, buf, offset, n, compressed); register_pfs_file_io_end(locker, n); @@ -294,6 +296,8 @@ pfs_os_file_read_no_error_handling_func( void* buf, /*!< in: buffer where to read */ os_offset_t offset, /*!< in: file offset where to read */ ulint n, /*!< in: number of bytes to read */ + ibool compressed, /*!< in: is this file space + compressed ? */ const char* src_file,/*!< in: file name where func invoked */ ulint src_line)/*!< in: line where the func invoked */ { @@ -304,7 +308,7 @@ pfs_os_file_read_no_error_handling_func( register_pfs_file_io_begin(&state, locker, file, n, PSI_FILE_READ, src_file, src_line); - result = os_file_read_no_error_handling_func(file, buf, offset, n); + result = os_file_read_no_error_handling_func(file, buf, offset, n, compressed); register_pfs_file_io_end(locker, n); |