1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug # 17173 - Partitions: less than search fails

Bug # 17894 - Comparison with "less than" operator fails with range partition

The problem here was that on queries such as < 3, the range given is NULL < n < 3.
The null part works correctly where the null value is stored in rec[0] and the
field is marked as being null.  However, when the 3 is processed, the 3 is places
on rec[0] but the null flag is left uncleared.

partition_range.result:
  Results block for bug #17894
partition_range.test:
  Test block for bug #17894
partition_list.result:
  Results block for bug #17173
partition_list.test:
  Test block for bug #17173
opt_range.cc:
  call set_notnull to clear any null flag that may have been set
This commit is contained in:
rburnett@production.mysql.com
2006-03-13 14:50:16 +01:00
parent ce3dcff2f3
commit c9472ee254
5 changed files with 79 additions and 0 deletions

View File

@@ -180,3 +180,14 @@ primary key(a,b))
partition by list (a)
(partition x1 values in (1,2,9,4) tablespace ts1);
drop table t1;
CREATE TABLE t1 (s1 int) PARTITION BY LIST (s1)
(PARTITION p1 VALUES IN (1),
PARTITION p2 VALUES IN (2),
PARTITION p3 VALUES IN (3),
PARTITION p4 VALUES IN (4),
PARTITION p5 VALUES IN (5));
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
SELECT COUNT(*) FROM t1 WHERE s1 < 3;
COUNT(*)
2
DROP TABLE t1;