• Marko Mäkelä's avatar
    MDEV-17881 Assertion failure in cmp_dtuple_rec_with_match_bytes after instant ADD COLUMN · e46a3aa4
    Marko Mäkelä authored
    The special flag REC_INFO_MIN_REC_FLAG used to be only set on the
    first record in the leftmost node pointer page of each level of the tree.
    It was never set on leaf pages.
    
    MDEV-11369 Instant ADD COLUMN in MariaDB Server 10.3 repurposed the flag
    to identify a hidden metadata record, which is stored in the first record
    on the leftmost leaf page.
    
    If the adaptive hash index points to records in the leftmost leaf page
    after instant ALTER TABLE, we would have such a metadata record in the
    table, an assertion could fail when trying to validate the index record.
    In a release build, we might wrongly qualify the hidden metadata record
    and thus return garbage results.
    
    cmp_dtuple_rec_with_match_bytes(): If the REC_INFO_MIN_REC_FLAG is
    set on the record, assert that this is the first record on the
    leftmost page and that the record is a metadata record, and finally
    return 1, because by definition, anything is greater than the
    minimum record.
    e46a3aa4
rem0cmp.cc 32.7 KB