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

CHECK TABLE fails to check info_bits of records

    XMLWordPrintable

Details

    Description

      CHECK TABLE fails to validate the info_bits of records. Specifically, if you run it on a table that was corrupted due to MDEV-19916, it would fail to notice that the leaf level of the clustered index starts with a record where the 'minimum record mark' of info_bits is set. This can be repeated by running a debug build of MariaDB 10.3.16 and earlier, and then upgrading to a newer non-debug build in the middle of the test:

      --source include/have_innodb.inc
      --source include/have_debug.inc
       
      --echo #
      --echo # MDEV-19916 Corruption after instant ADD/DROP and shrinking the tree
      --echo #
      CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
       
      # Create an index tree with 2 levels of node pointer pages.
       
      SET @old_limit = @@innodb_limit_optimistic_insert_debug;
      SET GLOBAL innodb_limit_optimistic_insert_debug = 2;
      INSERT INTO t1 VALUES (1),(5),(4),(3),(2);
      SET GLOBAL innodb_limit_optimistic_insert_debug = @old_limit;
       
      ALTER TABLE t1 ADD COLUMN b INT, ALGORITHM=INSTANT;
       
      SET GLOBAL innodb_defragment = 1;
      OPTIMIZE TABLE t1;
      --source include/restart_mysqld.inc
      # restart with a newer MariaDB 10.3
      CHECK TABLE t1;
      

      Note: Please ignore debug assertion failures; we are interested in what the non-debug server does.

      Attachments

        Issue Links

          Activity

            People

              kevg Eugene Kosov (Inactive)
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.