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

Wrong result with DESC key on InnoDB table

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t (id int, a tinyint, PRIMARY KEY (id DESC), KEY (a)) ENGINE=InnoDB;
      INSERT INTO t VALUES (1,1),(2,9),(3,4),(4,4),(5,1);
       
      SELECT * FROM t WHERE id > 4 AND a = 1;
       
      # Cleanup
      DROP TABLE t;
      

      preview-10.8-MDEV-13756-desc-indexes f3f68d411

      SELECT * FROM t WHERE id > 4 AND a = 1;
      id	a
      DROP TABLE t;
      

      The SELECT returns an empty result. It should return the row (5,1).
      Not reproducible with MyISAM.
      Not reproducible with an ascending key.
      Not reproducible on 7efd3c55e or on the current top of the branch but with the reverted patch 8be39fbc002

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              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.