diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2009-04-01 10:34:59 +0500 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2009-04-01 10:34:59 +0500 |
commit | 968069d845dc09c32458ebe593bfadfb8b1ea035 (patch) | |
tree | 9031ef85e89dc7c228046e8bd0b090b64331ac1e /mysql-test/t/partition.test | |
parent | ab958ee0bd28986389d5c612af5821e8088c1104 (diff) | |
download | mariadb-git-968069d845dc09c32458ebe593bfadfb8b1ea035.tar.gz |
Fix for bug#42944: partition not pruned correctly
Problem: we don't prune a LESS THAN partition if MAXVALUE is given and
given value is equal to a LESS THAN value.
Fix: prune partitions in such cases.
mysql-test/r/partition.result:
Fix for bug#42944: partition not pruned correctly
- test result.
mysql-test/t/partition.test:
Fix for bug#42944: partition not pruned correctly
- test case.
sql/sql_partition.cc:
Fix for bug#42944: partition not pruned correctly
- prune partition if given value is equal to a LESS THAN value
and it's not a "PARTITION ... LESS THAN MAXVALUE" one.
Diffstat (limited to 'mysql-test/t/partition.test')
-rw-r--r-- | mysql-test/t/partition.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index fc6a33819d6..ce89609de39 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1922,6 +1922,19 @@ insert into t1 select s1 from t1 where s1=3; select count(*) from t1; drop table t1; + +--echo # +--echo # Bug#42944: partition not pruned correctly +--echo # +CREATE TABLE t1 (a int) PARTITION BY RANGE (a) + (PARTITION p0 VALUES LESS THAN (100), + PARTITION p1 VALUES LESS THAN (200), + PARTITION p2 VALUES LESS THAN (300), + PARTITION p3 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (10), (100), (200), (300), (400); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a>=200; +DROP TABLE t1; + --echo End of 5.1 tests |