summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_range.result
diff options
context:
space:
mode:
authorunknown <rburnett@production.mysql.com>2006-03-13 14:50:16 +0100
committerunknown <rburnett@production.mysql.com>2006-03-13 14:50:16 +0100
commit0c63aee7f9a46ca3e12615533677e64dda9819ba (patch)
tree3947d40f4f2e5d9995b3a91972988021c1e763c7 /mysql-test/r/partition_range.result
parent4487b8538f5d611d672fa2e5f1ccd90dfb1ebfcb (diff)
downloadmariadb-git-0c63aee7f9a46ca3e12615533677e64dda9819ba.tar.gz
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 sql/opt_range.cc: call set_notnull to clear any null flag that may have been set mysql-test/t/partition_list.test: Test block for bug #17173 mysql-test/r/partition_list.result: Results block for bug #17173 mysql-test/t/partition_range.test: Test block for bug #17894 mysql-test/r/partition_range.result: Results block for bug #17894
Diffstat (limited to 'mysql-test/r/partition_range.result')
-rw-r--r--mysql-test/r/partition_range.result26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result
index 4f92e127fe0..fc9350f5902 100644
--- a/mysql-test/r/partition_range.result
+++ b/mysql-test/r/partition_range.result
@@ -337,3 +337,29 @@ a b c
1 1 1
4 1 1
drop table t1;
+CREATE TABLE t1 (c1 int default NULL, c2 varchar(30) default NULL,
+c3 date default NULL) engine=myisam
+PARTITION BY RANGE (year(c3)) (PARTITION p0 VALUES LESS THAN (1995),
+PARTITION p1 VALUES LESS THAN (1996) , PARTITION p2 VALUES LESS THAN (1997) ,
+PARTITION p3 VALUES LESS THAN (1998) , PARTITION p4 VALUES LESS THAN (1999) ,
+PARTITION p5 VALUES LESS THAN (2000) , PARTITION p6 VALUES LESS THAN (2001) ,
+PARTITION p7 VALUES LESS THAN (2002) , PARTITION p8 VALUES LESS THAN (2003) ,
+PARTITION p9 VALUES LESS THAN (2004) , PARTITION p10 VALUES LESS THAN (2010),
+PARTITION p11 VALUES LESS THAN MAXVALUE );
+INSERT INTO t1 VALUES (1, 'testing partitions', '1995-07-17'),
+(3, 'testing partitions','1995-07-31'),
+(5, 'testing partitions','1995-08-13'),
+(7, 'testing partitions','1995-08-26'),
+(9, 'testing partitions','1995-09-09'),
+(0, 'testing partitions','2000-07-10'),
+(2, 'testing partitions','2000-07-23'),
+(4, 'testing partitions','2000-08-05'),
+(6, 'testing partitions','2000-08-19'),
+(8, 'testing partitions','2000-09-01');
+SELECT COUNT(*) FROM t1 WHERE c3 BETWEEN '1996-12-31' AND '2000-12-31';
+COUNT(*)
+5
+SELECT COUNT(*) FROM t1 WHERE c3 < '2000-12-31';
+COUNT(*)
+10
+DROP TABLE t1;