[MDEV-2216] LP:1002564 - Wrong result for a lookup query from a heap table Created: 2012-05-21  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Igor Babaev Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug1002564.xml    

 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)



 Comments   
Comment by Michael Widenius [ 2012-09-10 ]

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

Comment by Michael Widenius [ 2012-09-10 ]

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)

Comment by Rasmus Johansson (Inactive) [ 2012-09-10 ]

Launchpad bug id: 1002564

Generated at Thu Feb 08 06:40:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.