diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2009-04-01 10:34:59 +0500 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2009-04-01 10:34:59 +0500 |
commit | a26f8d91aa400f60fcabaab6c243956a0d9419fd (patch) | |
tree | 9031ef85e89dc7c228046e8bd0b090b64331ac1e /sql/sql_partition.cc | |
parent | cf208ac55a30ed176bbff9b0199db88f9519ae69 (diff) | |
download | mariadb-git-a26f8d91aa400f60fcabaab6c243956a0d9419fd.tar.gz |
Fix for bug#42944: partition not pruned correctly
Problem: we don't prune a LESS THAN partition if MAXVALUE is given and
given value is equal to a LESS THAN value.
Fix: prune partitions in such cases.
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 |