summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorramil/ram@mysql.com/ramil.myoffice.izhnet.ru <>2007-11-26 10:28:25 +0400
committerramil/ram@mysql.com/ramil.myoffice.izhnet.ru <>2007-11-26 10:28:25 +0400
commitbeff6193e0711b1732215f69df43207088913fdf (patch)
tree5ed65ba6297b7467391d45aa8de93623c84df83a /sql/partition_info.cc
parent81fc036f0c92de3907e64e773f67cfc91338de0b (diff)
downloadmariadb-git-beff6193e0711b1732215f69df43207088913fdf.tar.gz
Fix for bug #29258: Partitions: search fails for maximum unsigned bigint
Problems: 1. looking for a matching partition we miss the fact that the maximum allowed value is in the PARTITION p LESS THAN MAXVALUE. 2. one can insert maximum value if numeric maximum value is the last range. (should only work if LESS THAN MAXVALUE). 3. one cannot have both numeric maximum value and MAXVALUE string as ranges (the same value, but different meanings). Fix: consider the maximum value as a supremum.
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index ab887d5dda0..67f5f48556b 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -524,6 +524,13 @@ bool partition_info::check_range_constants()
current_largest= part_range_value;
range_int_array[i]= part_range_value;
}
+ else if (defined_max_value &&
+ current_largest == part_range_value &&
+ part_range_value == LONGLONG_MAX &&
+ i == (no_parts - 1))
+ {
+ range_int_array[i]= part_range_value;
+ }
else
{
my_error(ER_RANGE_NOT_INCREASING_ERROR, MYF(0));