Bug #18751 Partitions: IS NULL searches fail
Submitted: 3 Apr 2006 19:04 Modified: 5 Apr 2006 1:03
Reporter: Peter Gulutzan
Status: Duplicate
Category:Server: Partition Severity:S3 (Non-critical)
Version:5.1.9-beta-debug OS:Linux (SUSE 10.0)
Assigned to: Target Version:

[3 Apr 2006 19: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 4:10] Miguel Solorzano
Thank you for the bug report.
[5 Apr 2006 1:03] Sergey Petrunya
This bug has been (knowingly) fixed by fix for BUG#18558.