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

CHECK command wrongly reports table corruption

    XMLWordPrintable

Details

    Description

      Table corruption reported for versioned partitioned table after DELETE: "Found a misplaced row"

      --source include/have_partition.inc
       
      CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING PARTITION BY system_time LIMIT 3 (PARTITION p1 HISTORY, PARTITION p2 HISTORY, PARTITION pn CURRENT);
      INSERT INTO t1 VALUES (1),(2),(3),(4);
      DELETE FROM t1;
      DELETE FROM t1;
      CHECK TABLE t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 352e7667

      CHECK TABLE t1;
      Table	Op	Msg_type	Msg_text
      test.t1	check	error	Found a misplaced row
      test.t1	check	error	Partition p1 returned error
      test.t1	check	error	Upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
      

      All of debug, ASAN, release builds produce the same result.
      Reproducible on 10.3-10.5 with at least InnoDB, MyISAM, Aria.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.