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

Incorrect query results for an indexed text column

    XMLWordPrintable

Details

    • Q3/2025 Maintenance, Q4/2025 Server Maintenance, Q1/2026 Server Maintenance

    Description

      I run the following statements, in which an incorrect query result is returned.

      CREATE TABLE t1 (c1 TEXT, UNIQUE (c1(1)));
      INSERT INTO t1 (c1) VALUES ('a');
      SELECT c1 FROM t1 WHERE ('abc' IN (SELECT c1 FROM t1)) IS FALSE; -- {}, expected: {a}
      

      Case showing that 10.11 is affected by the same bug (from MDEV-34006, testing showed that that bug is repaired by the fix for this ticket):

      CREATE TABLE t1 (c1 float, KEY i1 (c1));
      INSERT INTO t1(c1) VALUES (-9.183);
      SELECT c1 FROM t1 WHERE (BINARY c1) NOT IN (SELECT c1 FROM t1 USE INDEX (i1)); -- actual:{}, expected: {-9.183}
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              John Jove John Jove
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: