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

Wrong result with DESC key on partitioned Spider table

    XMLWordPrintable

Details

    Description

      --source include/have_partition.inc
       
      INSTALL SONAME 'ha_spider';
      SET spider_same_server_link= 1;
       
      CREATE TABLE t1 (a INT PRIMARY KEY);
      CREATE TABLE t2 (a INT PRIMARY KEY);
       
      eval 
      CREATE TABLE t (a INT, PRIMARY KEY (a DESC)) ENGINE=SPIDER
      COMMENT "host '127.0.0.1', port '$MASTER_MYPORT', user 'root'"
      PARTITION BY RANGE (a) 
      (PARTITION p1 VALUES LESS THAN (4) COMMENT "table 't1'",
       PARTITION p2 VALUES LESS THAN (MAXVALUE) COMMENT "table 't2'");
       
      INSERT INTO t VALUES (1),(2),(10),(11);
      SELECT * FROM t WHERE a > 1 ORDER BY a;
      

      SELECT returns an empty result set.

      preview-10.8-MDEV-13756-desc-indexes c10e10c6

      SELECT * FROM t WHERE a > 1 ORDER BY a;
      a
      

      With an ASC key the expected result is returned:

      SELECT * FROM t WHERE a > 1 ORDER BY a;
      a
      2
      10
      11
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              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.