Commit 32591e69 authored by unknown's avatar unknown

BUG#18198: Too much expressiveness in partition function allowed

Fixed the error check


sql/partition_info.cc:
  Fixed the error check
parent d868d032
......@@ -658,8 +658,13 @@ bool partition_info::check_partition_info(handlerton **eng_type,
bool part_expression_ok= TRUE;
DBUG_ENTER("partition_info::check_partition_info");
if (part_expr->walk(Item::check_partition_func_processor,
(byte*)&part_expression_ok))
if (part_type != HASH_PARTITION || !list_of_part_fields)
part_expr->walk(Item::check_partition_func_processor,
(byte*)&part_expression_ok);
if (is_sub_partitioned() && !list_of_subpart_fields)
subpart_expr->walk(Item::check_partition_func_processor,
(byte*)&part_expression_ok);
if (!part_expression_ok)
{
my_error(ER_PARTITION_FUNC_NOT_ALLOWED, MYF(0));
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