BUG#18198

Fixed interface to check_partition_func_processor
parent 58ee682e
...@@ -722,25 +722,17 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, ...@@ -722,25 +722,17 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type,
if (check_partition_function) if (check_partition_function)
{ {
int part_expression_ok= 1; int err= 0;
int pf_collation_allowed= 1;
int spf_collation_allowed= 1;
if (part_type != HASH_PARTITION || !list_of_part_fields) if (part_type != HASH_PARTITION || !list_of_part_fields)
{ {
part_expr->walk(&Item::check_partition_func_processor, 0, err= part_expr->walk(&Item::check_partition_func_processor, 0,
(byte*)(&part_expression_ok)); NULL);
pf_collation_allowed= part_expression_ok; if (!err && is_sub_partitioned() && !list_of_subpart_fields)
part_expression_ok= 1; err= subpart_expr->walk(&Item::check_partition_func_processor, 0,
if (is_sub_partitioned() && !list_of_subpart_fields) NULL);
{
subpart_expr->walk(&Item::check_partition_func_processor, 0,
(byte*)(&part_expression_ok));
}
spf_collation_allowed= part_expression_ok;
} }
if (!pf_collation_allowed || if (err)
!spf_collation_allowed)
{ {
my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0)); my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0));
goto end; goto end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment