diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-05-26 14:59:39 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-05-27 15:34:10 +0300 |
commit | 2bea4bd9ed7ebdee60a70918816c46d2cf3362b9 (patch) | |
tree | e76b5bfdefaacdd824061732d1d884b5ad75554a /storage/innobase/buf/buf0dblwr.cc | |
parent | 0dc14257cbdf0f40cbe36bdc7019a477ff02c931 (diff) | |
download | mariadb-git-2bea4bd9ed7ebdee60a70918816c46d2cf3362b9.tar.gz |
MDEV-8233: InnoDB: Assertion failure in fil_page_decompress with encrypted tables
Analysis: Problem was that used compression method needs to be stored
to the page.
Fixed by storing compression method after key_version to the page.
Diffstat (limited to 'storage/innobase/buf/buf0dblwr.cc')
-rw-r--r-- | storage/innobase/buf/buf0dblwr.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index 15a46abe55f..934ff07090e 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -744,6 +744,14 @@ buf_dblwr_check_page_lsn( /*=====================*/ const page_t* page) /*!< in: page to check */ { + ibool page_compressed = (mach_read_from_2(page+FIL_PAGE_TYPE) == FIL_PAGE_PAGE_COMPRESSED); + uint key_version = mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION); + + /* Ignore page compressed or encrypted pages */ + if (page_compressed || key_version) { + return; + } + if (memcmp(page + (FIL_PAGE_LSN + 4), page + (UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM + 4), |