[Commits] a032001: postreview fix

Oleksandr Byelkin sanja at mariadb.com
Fri Sep 9 14:49:46 EEST 2016


revision-id: a0320012c8d8f78f711036a31bea6cd12c5a4018 (mariadb-10.1.8-247-ga032001)
parent(s): 57ad2c9d6ae010da3a49879cc1c1e1e1282088fd
committer: Oleksandr Byelkin
timestamp: 2016-09-09 13:49:46 +0200
message:

postreview fix

---
 mysql-test/r/partition_default.result | 26 ++++++++++++++++++++++++++
 mysql-test/t/partition_default.test   | 28 ++++++++++++++++++++++++++++
 sql/sql_partition.cc                  |  1 +
 3 files changed, 55 insertions(+)

diff --git a/mysql-test/r/partition_default.result b/mysql-test/r/partition_default.result
index abaeced..4d99841 100644
--- a/mysql-test/r/partition_default.result
+++ b/mysql-test/r/partition_default.result
@@ -1178,3 +1178,29 @@ select * from t1 where i = 10 and j=10;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p1	system	NULL	NULL	NULL	NULL	1	
 drop table t1;
+create table t1
+( 
+a int not null,
+b int not null,
+c int
+)
+partition by list columns(a,b) 
+(
+partition p1 values in ((10,10)), 
+partition p2 values in ((10,20)), 
+partition p3 values in ((10,30)),
+partition p4 values in ((10,40)), 
+partition p5 values in ((10,50)) 
+);
+insert into t1 values 
+(10,10,1234), 
+(10,20,1234), 
+(10,30,1234),
+(10,40,1234), 
+(10,50,1234);
+explain partitions 
+select * from t1 
+where a>=10  and (a <=10 and b <=30);
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	p1,p2,p3	ALL	NULL	NULL	NULL	NULL	3	Using where
+drop table t1;
diff --git a/mysql-test/t/partition_default.test b/mysql-test/t/partition_default.test
index e4a39e2..e6eec53 100644
--- a/mysql-test/t/partition_default.test
+++ b/mysql-test/t/partition_default.test
@@ -472,3 +472,31 @@ select * from t1 where i = 10 and j=10;
 explain partitions
 select * from t1 where i = 10 and j=10;
 drop table t1;
+
+create table t1
+( 
+  a int not null,
+  b int not null,
+  c int
+)
+partition by list columns(a,b) 
+(
+  partition p1 values in ((10,10)), 
+  partition p2 values in ((10,20)), 
+  partition p3 values in ((10,30)),
+  partition p4 values in ((10,40)), 
+  partition p5 values in ((10,50)) 
+);
+
+insert into t1 values 
+  (10,10,1234), 
+  (10,20,1234), 
+  (10,30,1234),
+  (10,40,1234), 
+  (10,50,1234);
+
+explain partitions 
+select * from t1 
+where a>=10  and (a <=10 and b <=30);
+
+drop table t1;
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 24dff23..034816a 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -7747,6 +7747,7 @@ int get_part_iter_for_interval_cols_via_map(partition_info *part_info,
   can_match_multiple_values= ((flags &
                                (NO_MIN_RANGE | NO_MAX_RANGE | NEAR_MIN |
                                 NEAR_MAX)) ||
+                              (min_len != max_len) ||
                               (min_len != full_length) ||
                               memcmp(min_value, max_value, min_len));
   DBUG_ASSERT(can_match_multiple_values || (flags & EQ_RANGE) || flags == 0);


More information about the commits mailing list