summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorunknown <mikael/pappa@dator5.(none)>2006-09-26 02:30:40 -0400
committerunknown <mikael/pappa@dator5.(none)>2006-09-26 02:30:40 -0400
commitfad4962a5b98b671a56db5e6f42a6cf49770edf1 (patch)
tree4646951de18359c78979570e6bf3b58d68de9cbf /sql/partition_info.cc
parent35f1ee03287023b0114b28a27f2ca10d4d0fdf0c (diff)
downloadmariadb-git-fad4962a5b98b671a56db5e6f42a6cf49770edf1.tar.gz
BUG#18198
Fixed interface to check_partition_func_processor sql/partition_info.cc: Fixed interface to check_partition_func_processor
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc22
1 files changed, 7 insertions, 15 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index ecf423f08b1..c8cf38e5629 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -722,25 +722,17 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type,
if (check_partition_function)
{
- int part_expression_ok= 1;
- int pf_collation_allowed= 1;
- int spf_collation_allowed= 1;
+ int err= 0;
if (part_type != HASH_PARTITION || !list_of_part_fields)
{
- part_expr->walk(&Item::check_partition_func_processor, 0,
- (byte*)(&part_expression_ok));
- pf_collation_allowed= part_expression_ok;
- part_expression_ok= 1;
- if (is_sub_partitioned() && !list_of_subpart_fields)
- {
- subpart_expr->walk(&Item::check_partition_func_processor, 0,
- (byte*)(&part_expression_ok));
- }
- spf_collation_allowed= part_expression_ok;
+ err= part_expr->walk(&Item::check_partition_func_processor, 0,
+ NULL);
+ if (!err && is_sub_partitioned() && !list_of_subpart_fields)
+ err= subpart_expr->walk(&Item::check_partition_func_processor, 0,
+ NULL);
}
- if (!pf_collation_allowed ||
- !spf_collation_allowed)
+ if (err)
{
my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0));
goto end;