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

prefix index causes incorrect range query result

    XMLWordPrintable

Details

    Description

      The same SELECT statement returned different results after I dropped the index on the datatype LONGTEXT;

      DROP DATABASE IF EXISTS test;
      CREATE DATABASE test;
      USE test;
       
      CREATE TABLE `t0` (
      `c0` LONGTEXT,
      KEY `i0` (`c0`(1))
      ) ;
       
      INSERT INTO t0(c0) VALUES ('꙰dcF');
      REPLACE INTO t0(c0) VALUES ('kER');
       
      SELECT ALL t0.c0 FROM t0 WHERE 'C0' <= t0.c0; --{kER}
      DROP INDEX i0 ON t0;
      SELECT ALL t0.c0 FROM t0 WHERE 'C0' <= t0.c0; --{꙰dcF,kER}
      

      Attachments

        Issue Links

          Activity

            People

              raghunandan.bhat Raghunandan Bhat
              liufan liufan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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