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

Wrong result with Case 2 of non-merging partition index scan

    XMLWordPrintable

Details

    • Q4/2026 Server Maintenance

    Description

      Test case:

      CREATE TABLE t1 (a INT, b INT, c INT, PRIMARY KEY(a,c), KEY(b,c)) ENGINE=InnoDB
      PARTITION BY RANGE(c) (PARTITION p0 VALUES LESS THAN (10),
                             PARTITION p1 VALUES LESS THAN (20));
      INSERT INTO t1 VALUES (1,1,5),(2,0,12);
      --echo # expect 5, but output nothing
      SELECT c FROM t1 FORCE INDEX(b) WHERE b=1 AND c<=15 ORDER BY c DESC;
       
      DROP TABLE t1;
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              ycp Yuchen Pei
              Yuchen Pei Yuchen Pei
              Sergei Petrunia Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 1.65d Original Estimate - 1.65d
                  1.65d
                  Remaining:
                  Time Spent - 1d 6h 2m Remaining Estimate - 0.35d
                  0.35d
                  Logged:
                  Time Spent - 1d 6h 2m Remaining Estimate - 0.35d
                  1d 6h 2m

                  Git Integration

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