• Marko Mäkelä's avatar
    MDEV-14126: Remove page_is_root() · b59d4846
    Marko Mäkelä authored
    The predicate page_is_root(), which was added in MariaDB Server 10.2.2,
    is based on a wrong assumption.
    
    Under some circumstances, InnoDB can transform B-trees into a degenerate
    state where a non-leaf page has no sibling pages. Because of this,
    we cannot assume that a page that has no siblings is the root page.
    This bug will be tracked as MDEV-19022.
    
    Because of the bug that may affect many InnoDB data files, we must remove
    and replace the wrong predicate. Using the wrong predicate can cause
    corruption. A leaf page is not allowed to be empty except if it is the
    root page, and the entire table is empty.
    b59d4846
btr0btr.cc 156 KB