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

LP:1002564 - Wrong result for a lookup query from a heap table

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      The following test case gives us a wrong result in MariaDB 5.2/5.5

      CREATE TABLE t1 (
      c1 VARCHAR(10) NOT NULL,
      KEY i1 (c1(3))
      ) ENGINE=MEMORY DEFAULT CHARSET=latin1;
      INSERT INTO t1 VALUES ('foo1'), ('bar2'), ('baz3');

      SELECT * FROM t1 WHERE c1='bar2';

      MariaDB [test]> SELECT * FROM t1 WHERE c1='bar2';
      Empty set (0.00 sec)

      (see also bug #47704 from bugs.mysql.com)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            monty Michael Widenius added a comment -

            Re: Wrong result for a lookup query from a heap table
            This is a problem with hash indexes. I will look into fixing this.
            It works if you add 'using btree' to the KEY il

            Show
            monty Michael Widenius added a comment - Re: Wrong result for a lookup query from a heap table This is a problem with hash indexes. I will look into fixing this. It works if you add 'using btree' to the KEY il
            Hide
            monty Michael Widenius added a comment -

            Re: Wrong result for a lookup query from a heap table
            Fix pushed to 5.5
            (No reason to push into 5.2 as this is an edge case)

            Show
            monty Michael Widenius added a comment - Re: Wrong result for a lookup query from a heap table Fix pushed to 5.5 (No reason to push into 5.2 as this is an edge case)
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 1002564

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 1002564

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                igor Igor Babaev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: