summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2016-09-08 19:43:09 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2016-09-09 13:50:17 +0200
commitb22ed66c6b479355b97f59bbf2aadc23f4005419 (patch)
tree58f579f3584ef91f1f651c360ba0acba0870ea5d /sql/sql_partition.cc
parent2c52493d140d96d0a1bfd442aa569d2690a22a59 (diff)
downloadmariadb-git-b22ed66c6b479355b97f59bbf2aadc23f4005419.tar.gz
MDEV-10765: Wrong result - query does not retrieve values from default partition on a table partitioned by list columns
Partial matches should be treat as not exact one.
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 54396b941a4..034816ada3f 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -7723,6 +7723,7 @@ int get_part_iter_for_interval_cols_via_map(partition_info *part_info,
bool can_match_multiple_values;
uint32 nparts;
get_col_endpoint_func UNINIT_VAR(get_col_endpoint);
+ uint full_length= 0;
DBUG_ENTER("get_part_iter_for_interval_cols_via_map");
if (part_info->part_type == RANGE_PARTITION)
@@ -7740,9 +7741,14 @@ int get_part_iter_for_interval_cols_via_map(partition_info *part_info,
else
assert(0);
+ for (uint32 i= 0; i < part_info->num_columns; i++)
+ full_length+= store_length_array[i];
+
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);
if (can_match_multiple_values && part_info->has_default_partititon())