mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
BUG#21339: Crash at EXPLAIN PARTITIONS
Caused by missing check for end of partitions in prune range check
This commit is contained in:
@@ -9,6 +9,18 @@
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Bug 21339: Crash in Explain Partitions
|
||||
#
|
||||
create table t1 (a date)
|
||||
engine = innodb
|
||||
partition by range (year(a))
|
||||
(partition p0 values less than (2006),
|
||||
partition p1 values less than (2007));
|
||||
explain partitions select * from t1
|
||||
where a between '2006-01-01' and '2007-06-01';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# More checks for partition pruning
|
||||
#
|
||||
@@ -686,3 +698,4 @@ EXPLAIN PARTITIONS SELECT * from t1
|
||||
WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR
|
||||
(a >= '2005-07-01' AND a <= '2005-09-30');
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user