diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2010-03-10 12:56:05 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2010-03-10 12:56:05 +0100 |
commit | 29b39e7a4423188d99570b290127a74151805ed5 (patch) | |
tree | 4a0f89eaf8659b53bd68bdeb3add3518977b2c2c /mysql-test/t/partition_pruning.test | |
parent | 25a9f5e0941b879f1558579d4718ea5c747c7d12 (diff) | |
download | mariadb-git-29b39e7a4423188d99570b290127a74151805ed5.tar.gz |
Bug#51830: Incorrect partition pruning on range partition
(regression)
Problem was that partition pruning did not exclude the
last partition if the range was beyond it
(i.e. not using MAXVALUE)
Fix was to not include the last partition if the
partitioning function value was not within the partition
range.
mysql-test/r/partition_innodb.result:
Bug#51830: Incorrect partition pruning on range partition
(regression)
Updated result
mysql-test/r/partition_pruning.result:
Bug#51830: Incorrect partition pruning on range partition
(regression)
Updated result
mysql-test/t/partition_innodb.test:
Bug#51830: Incorrect partition pruning on range partition
(regression)
Added test for pruning in InnoDB, since it does not show
for MyISAM due to 'Impossible WHERE noticed after reading
const tables'.
mysql-test/t/partition_pruning.test:
Bug#51830: Incorrect partition pruning on range partition
(regression)
Added test
sql/sql_partition.cc:
Bug#51830: Incorrect partition pruning on range partition
(regression)
Also increase the partition id if not inside the last partition
(and no MAXVALUE is defined).
Added comments and DBUG_ASSERT.
Diffstat (limited to 'mysql-test/t/partition_pruning.test')
-rw-r--r-- | mysql-test/t/partition_pruning.test | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test index 315b8393d93..358832496e5 100644 --- a/mysql-test/t/partition_pruning.test +++ b/mysql-test/t/partition_pruning.test @@ -702,15 +702,29 @@ insert into t7 values (10),(30),(50); # leftmost intervals explain partitions select * from t7 where a < 5; +explain partitions select * from t7 where a < 9; +explain partitions select * from t7 where a <= 9; +explain partitions select * from t7 where a = 9; +explain partitions select * from t7 where a >= 9; +explain partitions select * from t7 where a > 9; explain partitions select * from t7 where a < 10; explain partitions select * from t7 where a <= 10; explain partitions select * from t7 where a = 10; +explain partitions select * from t7 where a >= 10; +explain partitions select * from t7 where a > 10; #rightmost intervals +explain partitions select * from t7 where a < 89; +explain partitions select * from t7 where a <= 89; +explain partitions select * from t7 where a = 89; +explain partitions select * from t7 where a > 89; +explain partitions select * from t7 where a >= 89; explain partitions select * from t7 where a < 90; +explain partitions select * from t7 where a <= 90; explain partitions select * from t7 where a = 90; explain partitions select * from t7 where a > 90; explain partitions select * from t7 where a >= 90; +explain partitions select * from t7 where a > 91; # misc intervals explain partitions select * from t7 where a > 11 and a < 29; @@ -728,15 +742,29 @@ insert into t7 values (10),(30),(50); # leftmost intervals explain partitions select * from t7 where a < 5; +explain partitions select * from t7 where a < 9; +explain partitions select * from t7 where a <= 9; +explain partitions select * from t7 where a = 9; +explain partitions select * from t7 where a >= 9; +explain partitions select * from t7 where a > 9; explain partitions select * from t7 where a < 10; explain partitions select * from t7 where a <= 10; explain partitions select * from t7 where a = 10; +explain partitions select * from t7 where a >= 10; +explain partitions select * from t7 where a > 10; #rightmost intervals +explain partitions select * from t7 where a < 89; +explain partitions select * from t7 where a <= 89; +explain partitions select * from t7 where a = 89; +explain partitions select * from t7 where a > 89; +explain partitions select * from t7 where a >= 89; explain partitions select * from t7 where a < 90; +explain partitions select * from t7 where a <= 90; explain partitions select * from t7 where a = 90; explain partitions select * from t7 where a > 90; explain partitions select * from t7 where a >= 90; +explain partitions select * from t7 where a > 91; # misc intervals explain partitions select * from t7 where a > 11 and a < 29; |