summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorunknown <mikael@c-7308e253.1238-1-64736c10.cust.bredbandsbolaget.se>2006-06-05 14:55:22 -0400
committerunknown <mikael@c-7308e253.1238-1-64736c10.cust.bredbandsbolaget.se>2006-06-05 14:55:22 -0400
commite05d2d06cb4adfe27dc4c0c4cb8f445332e9ab80 (patch)
tree291b3146c2532a98644faadc8882a4c060ad2931 /sql/sql_partition.cc
parent9d371277668f5dfe51feec9ed58b5712859b8fbb (diff)
downloadmariadb-git-e05d2d06cb4adfe27dc4c0c4cb8f445332e9ab80.tar.gz
BUG#16002: Handle unsigned integer partition functions
mysql-test/r/partition.result: Added new test cases mysql-test/r/partition_error.result: Fixed test case mysql-test/t/partition.test: Added new test cases mysql-test/t/partition_error.test: Fixed test case sql/ha_partition.cc: Review fixes sql/partition_element.h: Review fixes sql/partition_info.cc: Review fixes sql/share/errmsg.txt: Review fixes sql/sql_partition.cc: Review fixes sql/sql_yacc.yy: Enabled possibility to use (MAXVALUE) as well as MAXVALUE.
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc33
1 files changed, 11 insertions, 22 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 05f99110f61..45cd13ce854 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -819,8 +819,8 @@ int check_signed_flag(partition_info *part_info)
if (part_elem->signed_flag)
{
- my_error(ER_SIGNED_PARTITION_CONSTANT_ERROR, MYF(0));
- error= ER_SIGNED_PARTITION_CONSTANT_ERROR;
+ my_error(ER_PARTITION_CONST_DOMAIN_ERROR, MYF(0));
+ error= ER_PARTITION_CONST_DOMAIN_ERROR;
break;
}
} while (++i < part_info->no_parts);
@@ -841,8 +841,8 @@ int check_signed_flag(partition_info *part_info)
func_expr The item tree reference of the partition function
table The table object
part_info Reference to partitioning data structure
- sub_part Is the table subpartitioned as well
- set_up_fields Flag if we are to set-up field arrays
+ is_sub_part Is the table subpartitioned as well
+ is_field_to_be_setup Flag if we are to set-up field arrays
RETURN VALUE
TRUE An error occurred, something was wrong with the
@@ -1376,7 +1376,7 @@ static uint32 get_part_id_from_linear_hash(longlong hash_value, uint mask,
fix_partition_func()
thd The thread object
table TABLE object for which partition fields are set-up
- create_table_ind Indicator of whether openfrm was called as part of
+ is_create_table_ind Indicator of whether openfrm was called as part of
CREATE or ALTER TABLE
RETURN VALUE
@@ -1760,28 +1760,17 @@ static int add_partition_values(File fptr, partition_info *part_info,
if (part_info->part_type == RANGE_PARTITION)
{
err+= add_string(fptr, "VALUES LESS THAN ");
- if (p_elem->signed_flag)
+ if (!p_elem->max_value)
{
- if (!p_elem->max_value)
- {
- err+= add_begin_parenthesis(fptr);
+ err+= add_begin_parenthesis(fptr);
+ if (p_elem->signed_flag)
err+= add_int(fptr, p_elem->range_value);
- err+= add_end_parenthesis(fptr);
- }
else
- err+= add_string(fptr, partition_keywords[PKW_MAXVALUE].str);
- }
- else
- {
- if (!p_elem->max_value)
- {
- err+= add_begin_parenthesis(fptr);
err+= add_uint(fptr, (ulonglong)p_elem->range_value);
- err+= add_end_parenthesis(fptr);
- }
- else
- err+= add_string(fptr, partition_keywords[PKW_MAXVALUE].str);
+ err+= add_end_parenthesis(fptr);
}
+ else
+ err+= add_string(fptr, partition_keywords[PKW_MAXVALUE].str);
}
else if (part_info->part_type == LIST_PARTITION)
{