Wrong result for a lookup query from a heap table

Bug #1002564 reported by Igor Babaev on 2012-05-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Committed
Critical
Michael Widenius

Bug 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)

Changed in maria:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Michael Widenius (monty)
milestone: none → 5.2
Michael Widenius (monty) wrote :

This is a problem with hash indexes. I will look into fixing this.
It works if you add 'using btree' to the KEY il

Michael Widenius (monty) on 2012-09-10
Changed in maria:
status: Confirmed → In Progress
Michael Widenius (monty) wrote :

Fix pushed to 5.5
(No reason to push into 5.2 as this is an edge case)

Changed in maria:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers