diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-14 16:38:28 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-14 16:38:28 +0300 |
commit | ae702d76438d15c84e0e113031366b0a8da47b9f (patch) | |
tree | fe33bed68bf51d73ed687a9641900c22131d7aa8 /storage | |
parent | 2920377aa088b565aa4d2bbaa2fdbb3004d2933a (diff) | |
download | mariadb-git-ae702d76438d15c84e0e113031366b0a8da47b9f.tar.gz |
MDEV-20813: Remove the buf_flush_init_for_writing() assertion
Old InnoDB/XtraDB versions only initialized FIL_PAGE_TYPE for
B-tree pages (to FIL_PAGE_INDEX), and left it uninitialized
(possibly containing FIL_PAGE_INDEX) for others. In MySQL
or MariaDB 5.5, the field is initialized on almost all pages,
but still not all of them.
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 we are now removing from 10.1.
There, we will be able to modify fil_crypt_rotate_page() so
that it will skip the key rotation for pages that contain 0
in FIL_PAGE_TYPE.
In MariaDB 10.1, there is no logic that would initialize
FIL_PAGE_TYPE on data pages in old data files after an update.
So, encryption key rotation may routinely cause page flushes
on pages that contain 0 in FIL_PAGE_TYPE.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/buf/buf0flu.cc | 1 | ||||
-rw-r--r-- | storage/xtradb/buf/buf0flu.cc | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index f918b88a5ea..1325a938dd6 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -745,7 +745,6 @@ buf_flush_init_for_writing( ib_uint32_t checksum = 0 /* silence bogus gcc warning */; ut_ad(page); - ut_ad(!newest_lsn || fil_page_get_type(page)); if (page_zip_) { page_zip_des_t* page_zip; diff --git a/storage/xtradb/buf/buf0flu.cc b/storage/xtradb/buf/buf0flu.cc index e4512cacff8..eccc7c281c1 100644 --- a/storage/xtradb/buf/buf0flu.cc +++ b/storage/xtradb/buf/buf0flu.cc @@ -787,7 +787,6 @@ buf_flush_init_for_writing( ib_uint32_t checksum = 0 /* silence bogus gcc warning */; ut_ad(page); - ut_ad(!newest_lsn || fil_page_get_type(page)); if (page_zip_) { page_zip_des_t* page_zip; |