Bug #18751 Partitions: IS NULL searches fail
Submitted: 3 Apr 2006 17:04 Modified: 4 Apr 2006 23:03
Reporter: Peter Gulutzan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.9-beta-debug OS:Linux (SUSE 10.0)
Assigned to: CPU Architecture:Any

[3 Apr 2006 17:04] Peter Gulutzan
Description:
If I say
"partitioned_column < value OR partitioned_column IS NULL",
I get nothing, even when there is a NULL for the column.
The failure happens only when ORing with expressions containing
"<".

How to repeat:
mysql> create table tp5 (s1 int) partition by list (s1) (partition p1 values in (0), partition p2 values in (1), partition p3 values in (null));
Query OK, 0 rows affected (0.02 sec)

mysql> insert into tp5 values (0),(1),(null);
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> select count(*) from tp5 where s1 < 0 or s1 is null;
+----------+
| count(*) |
+----------+
| 0        |
+----------+
1 row in set (0.00 sec)
[4 Apr 2006 2:10] MySQL Verification Team
Thank you for the bug report.
[4 Apr 2006 23:03] Sergey Petrunya
This bug has been (knowingly) fixed by fix for BUG#18558.