• Marko Mäkelä's avatar
    MDEV-20813: Remove the buf_flush_init_for_writing() assertion · ae702d76
    Marko Mäkelä authored
    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.
    ae702d76
buf0flu.cc 87.9 KB