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

Connect tables (FIX/DOS) don't work with DESC keys - wrong results

    XMLWordPrintable

Details

    Description

      --source include/have_partition.inc
       
      INSTALL SONAME 'ha_connect';
       
      CREATE TABLE t1 (
        id INT,
        f VARCHAR(32),
        PRIMARY KEY (id DESC)
      ) ENGINE=CONNECT TABLE_TYPE=DOS FILE_NAME='f.txt';
       
      INSERT INTO t1 VALUES(1,'one'),(2,'two'),(3,'three');
       
      SELECT * FROM t1 WHERE id >= 2;
       
      # Cleanup
      DROP TABLE t1;
      UNINSTALL SONAME 'ha_connect';
      

      The SELECT returns an empty result set

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

      SELECT * FROM t1 WHERE id >= 2;
      id	f
      DROP TABLE t1;
      

      With an ascending key it returns two rows as expected:

      SELECT * FROM t1 WHERE id >= 2;
      id	f
      2	two
      3	three
      DROP TABLE t1;
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.