• Marko Mäkelä's avatar
    MDEV-27059 page_zip_dir_insert() may corrupt ROW_FORMAT=COMPRESSED tables · ebb15f98
    Marko Mäkelä authored
    In commit 7ae21b18 (MDEV-12353)
    the recovery of ROW_FORMAT=COMPRESSED tables was changed.
    Changes would be logged in a physical format for the compressed
    page image, so that the page need not be decompressed or compressed
    during recovery.
    
    page_zip_write_rec(): Log any update of the delete-mark flag in the
    ROW_FORMAT=COMPRESSED page.
    
    page_zip_dir_insert(): Copy the delete-mark flag. A delete-marked
    record may be inserted by btr_cur_pessimistic_update() via
    btr_cur_insert_if_possible(), page_cur_tuple_insert(),
    page_cur_insert_rec_zip(). In the observed scenario, it was
    an ROLLBACK. Presumably, the test case involved repeated DELETE
    and INSERT of the same key, or updating a key back and forth.
    This change alone might make the adjustment in page_zip_write_rec()
    redundant, but we play it safe because we failed to create a
    minimal test case for this scenario.
    ebb15f98
page0zip.cc 139 KB