Bug #4816 Composite index with blob column returns no results with null comparison
Submitted: 29 Jul 2004 21:34 Modified: 1 Aug 2004 13:10
Reporter: Dean Ellis Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S1 (Critical)
Version:4.0 OS:
Assigned to: Sergei Golubchik CPU Architecture:Any

[29 Jul 2004 21:34] Dean Ellis
Description:
Composite index covering blob column and char/varchar column returns no results with null comparison against the blob.

How to repeat:
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( a tinytext, b char(1), INDEX idx (a(1),b) );
INSERT INTO t1 VALUES (NULL,''), (NULL,'');
SELECT COUNT(*) FROM t1 USE INDEX (idx) WHERE a IS NULL;
DROP TABLE t1;

Suggested fix:
n/a
[1 Aug 2004 13:10] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

fixed in 4.0.21