diff options
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r-- | sql/sql_partition.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index ae55c194c3c..4a50650b6f4 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -2937,7 +2937,8 @@ uint32 get_partition_id_range_for_endpoint(partition_info *part_info, the maximum value is in the current partition. */ if (part_func_value > bound || - (part_func_value == bound && !part_info->defined_max_value)) + (part_func_value == bound && + (!part_info->defined_max_value || loc_part_id < max_partition))) loc_part_id++; } else |