summaryrefslogtreecommitdiff
path: root/sql/keycaches.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-10-14 17:26:21 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-10-14 17:26:21 +0300
commitf989c0ce66aa50ac904c75ccbdb850c0daa0419f (patch)
treeac3661b7590f1bd08445673bf56db9184005ef3d /sql/keycaches.cc
parent4f9f3f19cd478be270f9276b6adcdb5aa6171504 (diff)
downloadmariadb-git-f989c0ce66aa50ac904c75ccbdb850c0daa0419f.tar.gz
MDEV-20813: Do not rotate keys for unallocated pages
fil_crypt_rotate_page(): Skip the key rotation for pages that carry 0 in FIL_PAGE_TYPE. This avoids not only unnecessary writes, but also failures of the recently added debug assertion in buf_flush_init_for_writing() that the FIL_PAGE_TYPE should be nonzero. Note: the debug assertion can fail if the file was originally created before MySQL 5.5. In old InnoDB versions, FIL_PAGE_TYPE was only initialized for B-tree pages, to FIL_PAGE_INDEX. For any other pages, the field could be garbage, including FIL_PAGE_INDEX. In MariaDB 10.2 and later, buf_flush_init_for_writing() would initialize the FIL_PAGE_TYPE on such old pages, but only after passing the debug assertion that insists that pages have a nonzero FIL_PAGE_TYPE. Thus, the debug assertion at the start of buf_flush_init_for_writing() can fail when upgrading from very old debug files. This assertion is only present in debug builds, not release builds.
Diffstat (limited to 'sql/keycaches.cc')
0 files changed, 0 insertions, 0 deletions