Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17881

Assertion failure in cmp_dtuple_rec_with_match_bytes after instant ADD COLUMN

    XMLWordPrintable

    Details

      Description

      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 ADD COLUMN (or MDEV-15562 instant DROP COLUMN in 10.4.0), we would have such a metadata record in the table, an assertion could fail when trying to validate the index record:

      mysqld: /mariadb/10.4/storage/innobase/rem/rem0cmp.cc:799: int cmp_dtuple_rec_with_match_bytes(const dtuple_t*, const rec_t*, const dict_index_t*, const ulint*, ulint*, ulint*): Assertion `!(0x10UL & rec_get_info_bits(rec, rec_offs_comp(offsets)))' failed.
      

      I only repeated this in a 10.4-based development tree. Due to the highly nondeterministic nature of the adaptive hash index, it could be difficult to construct a deterministic test case for this.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marko Marko Mäkelä
                Reporter:
                marko Marko Mäkelä
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: