Commit 2d571860 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 279b8721
...@@ -658,8 +658,13 @@ bool partition_info::check_partition_info(handlerton **eng_type, ...@@ -658,8 +658,13 @@ bool partition_info::check_partition_info(handlerton **eng_type,
bool part_expression_ok= TRUE; bool part_expression_ok= TRUE;
DBUG_ENTER("partition_info::check_partition_info"); DBUG_ENTER("partition_info::check_partition_info");
if (part_expr->walk(Item::check_partition_func_processor, if (part_type != HASH_PARTITION || !list_of_part_fields)
(byte*)&part_expression_ok)) 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)); my_error(ER_PARTITION_FUNC_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