summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_pruning.result
diff options
context:
space:
mode:
authorunknown <sergefp@pylon.mylan>2007-09-14 14:25:45 +0400
committerunknown <sergefp@pylon.mylan>2007-09-14 14:25:45 +0400
commit98d79d93c925a88c9c6dcba613e54682d54b17a1 (patch)
treecb9f313a9491861e1f1d38db99d53b84b3d7a702 /mysql-test/r/partition_pruning.result
parent9a20ca1390268a8091106635feaf7056c047cbea (diff)
parent4aaabb06c011e20054613bff225823b3d66a135e (diff)
downloadmariadb-git-98d79d93c925a88c9c6dcba613e54682d54b17a1.tar.gz
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into mysql.com:/home/psergey/mysql-5.1-bug27927 mysql-test/r/partition_pruning.result: Auto merged
Diffstat (limited to 'mysql-test/r/partition_pruning.result')
-rw-r--r--mysql-test/r/partition_pruning.result28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result
index 9595676016c..396400f9010 100644
--- a/mysql-test/r/partition_pruning.result
+++ b/mysql-test/r/partition_pruning.result
@@ -911,3 +911,31 @@ explain partitions select * from t1 where a>-2 and a <=0;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p3 ALL NULL NULL NULL NULL 4 Using where
drop table t1;
+CREATE TABLE t1 ( recdate DATETIME NOT NULL )
+PARTITION BY RANGE( TO_DAYS(recdate) ) (
+PARTITION p0 VALUES LESS THAN ( TO_DAYS('2007-03-08') ),
+PARTITION p1 VALUES LESS THAN ( TO_DAYS('2007-04-01') )
+);
+INSERT INTO t1 VALUES ('2007-03-01 12:00:00');
+INSERT INTO t1 VALUES ('2007-03-07 12:00:00');
+INSERT INTO t1 VALUES ('2007-03-08 12:00:00');
+INSERT INTO t1 VALUES ('2007-03-15 12:00:00');
+must use p0 only:
+explain partitions select * from t1 where recdate < '2007-03-08 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where
+drop table t1;
+CREATE TABLE t1 ( recdate DATETIME NOT NULL )
+PARTITION BY RANGE( YEAR(recdate) ) (
+PARTITION p0 VALUES LESS THAN (2006),
+PARTITION p1 VALUES LESS THAN (2007)
+);
+INSERT INTO t1 VALUES ('2005-03-01 12:00:00');
+INSERT INTO t1 VALUES ('2005-03-01 12:00:00');
+INSERT INTO t1 VALUES ('2006-03-01 12:00:00');
+INSERT INTO t1 VALUES ('2006-03-01 12:00:00');
+must use p0 only:
+explain partitions select * from t1 where recdate < '2006-01-01 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where
+drop table t1;