summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_pruning.test
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2010-09-13 15:56:56 +0200
committerMattias Jonsson <mattias.jonsson@oracle.com>2010-09-13 15:56:56 +0200
commit92655149a60bf990e785f39e7c4f3142049bb495 (patch)
treee2cb245f59839f8b100868dab5c0db987cbfa7a2 /mysql-test/t/partition_pruning.test
parentdae7b019190b46cfaadf7b4c8d47fe05f6cfb457 (diff)
parentb76f3912628e0f0f0377eaf1e2f2a3ae0abfdada (diff)
downloadmariadb-git-92655149a60bf990e785f39e7c4f3142049bb495.tar.gz
merge
Diffstat (limited to 'mysql-test/t/partition_pruning.test')
-rw-r--r--mysql-test/t/partition_pruning.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test
index 27f6ddde615..f2ca16b9259 100644
--- a/mysql-test/t/partition_pruning.test
+++ b/mysql-test/t/partition_pruning.test
@@ -9,6 +9,30 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
--enable_warnings
--echo #
+--echo # Bug#53806: Wrong estimates for range query in partitioned MyISAM table
+--echo # Bug#46754: 'rows' field doesn't reflect partition pruning
+--echo #
+CREATE TABLE t1 (a INT PRIMARY KEY)
+PARTITION BY RANGE (a) (
+PARTITION p0 VALUES LESS THAN (1),
+PARTITION p1 VALUES LESS THAN (2),
+PARTITION p2 VALUES LESS THAN (3),
+PARTITION p3 VALUES LESS THAN (4),
+PARTITION p4 VALUES LESS THAN (5),
+PARTITION p5 VALUES LESS THAN (6),
+PARTITION max VALUES LESS THAN MAXVALUE);
+
+INSERT INTO t1 VALUES (-1),(0),(1),(2),(3),(4),(5),(6),(7),(8);
+
+--replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 11 #
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
+--replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 11 #
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 7;
+--replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 11 #
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
+DROP TABLE t1;
+
+--echo #
--echo # Bug#49742: Partition Pruning not working correctly for RANGE
--echo #
CREATE TABLE t1 (a INT PRIMARY KEY)