summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_innodb.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/partition_innodb.result')
-rw-r--r--mysql-test/r/partition_innodb.result49
1 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index 6167b4cef95..2a04aafe554 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -1,5 +1,54 @@
drop table if exists t1, t2;
#
+# Bug#51830: Incorrect partition pruning on range partition (regression)
+#
+CREATE TABLE t1 (a INT NOT NULL)
+ENGINE = InnoDB
+PARTITION BY RANGE(a)
+(PARTITION p10 VALUES LESS THAN (10),
+PARTITION p30 VALUES LESS THAN (30),
+PARTITION p50 VALUES LESS THAN (50),
+PARTITION p70 VALUES LESS THAN (70),
+PARTITION p90 VALUES LESS THAN (90));
+INSERT INTO t1 VALUES (10),(30),(50);
+INSERT INTO t1 VALUES (70);
+INSERT INTO t1 VALUES (80);
+INSERT INTO t1 VALUES (89);
+INSERT INTO t1 VALUES (90);
+ERROR HY000: Table has no partition for value 90
+INSERT INTO t1 VALUES (100);
+ERROR HY000: Table has no partition for value 100
+insert INTO t1 VALUES (110);
+ERROR HY000: Table has no partition for value 110
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 90;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 90;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 90;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 89;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p90 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 89;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p90 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 89;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 100;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 100;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 100;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
+DROP TABLE t1;
+#
# Bug#50104: Partitioned table with just 1 partion works with fk
#
CREATE TABLE t2 (