1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for BUG#18025: Wrong query results because of bugs in partition pruning:

- Fix typo bug in SEL_ARG::is_singlepoint()
 - In set_up_range_analysis_info(), treat MEDIUMINT as enumerable type just like other integer types
This commit is contained in:
sergefp@mysql.com
2006-03-31 15:17:15 +04:00
parent 8553a60e76
commit 3886483b54
4 changed files with 72 additions and 1 deletions

View File

@ -545,3 +545,41 @@ show status like 'Handler_read_next';
Variable_name Value
Handler_read_next 0
drop table t1, t2;
create table t1 ( f_int1 mediumint, f_int2 integer)
partition by list(mod(f_int1,4)) (
partition p_3 values in (-3),
partition p_2 values in (-2),
partition p_1 values in (-1),
partition p0 values in (0),
partition p1 values in (1),
partition p2 values in (2),
partition p3 values in (3)
);
insert into t1 values (9, 9), (8, 8), (7, 7), (6, 6), (5, 5),
(4, 4), (3, 3), (2, 2), (1, 1);
select * from t1 where f_int1 between 5 and 15 order by f_int1;
f_int1 f_int2
5 5
6 6
7 7
8 8
9 9
drop table t1;
create table t1 (a char(10)) partition by list(length(a)) (
partition p1 values in (1),
partition p2 values in (2),
partition p3 values in (3),
partition p4 values in (4),
partition p5 values in (5)
);
insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee');
select * from t1 where a>='a' and a <= 'dddd';
a
a
bb
ccc
dddd
explain partitions select * from t1 where a>='a' and a <= 'dddd';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1,p2,p3,p4,p5 ALL NULL NULL NULL NULL 5 Using where
drop table t1;