diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2016-02-01 19:36:22 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2016-02-01 19:36:22 +0300 |
commit | 74f15e2a7f647648bb19bc7c2583c36ccd0d67fc (patch) | |
tree | 12086f5113edeb5d0729f5cc9c26c4be6240041c /mysql-test/r | |
parent | a4ff37e912ee50d2ccee7fa50a361f9990ac78b4 (diff) | |
download | mariadb-git-74f15e2a7f647648bb19bc7c2583c36ccd0d67fc.tar.gz |
MDEV-9505: Valgrind failure in SEL_ARG::store_min,find_used_partitions
create_partition_index_description() had wrong logic to calculate
length of the key value buffer that is used by the range optimizer.
For some reason it used MAX(partitioning_columns_len,
subpartitioning_columns_len) while it should use SUM of these values.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/partition_pruning.result | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index e52c2c7d886..65b788a7d1b 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -3467,3 +3467,21 @@ id select_type table partitions type possible_keys key key_len ref rows Extra 1 PRIMARY t2 p_1000 ref PRIMARY PRIMARY 8 const 2 Using index 1 PRIMARY t1 p_1000 ALL PRIMARY NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join) drop table t1,t2; +# +# MDEV-9505: Valgrind failure in SEL_ARG::store_min,find_used_partitions,... +# +create table t1 (a int, b char(10), c varchar(5), d int) +partition by range columns(a,b,c) +subpartition by key (c,d) +subpartitions 3 +( partition p0 values less than (1,'abc','abc'), +partition p1 values less than (2,'abc','abc'), +partition p2 values less than (3,'abc','abc'), +partition p3 values less than (4,'abc','abc') +); +insert into t1 values (1,'a','b',1),(2,'a','b',2),(3,'a','b',3); +select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) OR +(a = 1 AND b >= 'a' AND (c = 'c' OR (c = 'd' AND d = 2)))); +a b c d +1 a b 1 +drop table t1; |