cleanup: vcol_in_partition_func_processor

rename to post_fix_fields_part_expr_processor()
because it's only used after fix_fields in
fix_fields_part_func() and can be used for
various post-fix_fields fixups
This commit is contained in:
Sergei Golubchik 2018-05-14 21:05:51 +02:00
parent 445ac662c3
commit c14c958c6c
3 changed files with 4 additions and 11 deletions

View file

@ -5761,18 +5761,11 @@ error:
return TRUE;
}
/*
@brief
Mark virtual columns as used in a partitioning expression
*/
bool Item_field::vcol_in_partition_func_processor(void *int_arg)
bool Item_field::post_fix_fields_part_expr_processor(void *int_arg)
{
DBUG_ASSERT(fixed);
if (field->vcol_info)
{
field->vcol_info->mark_as_in_partitioning_expr();
}
return FALSE;
}

View file

@ -1676,7 +1676,7 @@ public:
fields.
*/
virtual bool check_partition_func_processor(void *arg) { return 1;}
virtual bool vcol_in_partition_func_processor(void *arg) { return 0; }
virtual bool post_fix_fields_part_expr_processor(void *arg) { return 0; }
virtual bool rename_fields_processor(void *arg) { return 0; }
/** Processor used to check acceptability of an item in the defining
expression for a virtual column
@ -2649,7 +2649,7 @@ public:
bool register_field_in_write_map(void *arg);
bool register_field_in_bitmap(void *arg);
bool check_partition_func_processor(void *int_arg) {return FALSE;}
bool vcol_in_partition_func_processor(void *bool_arg);
bool post_fix_fields_part_expr_processor(void *bool_arg);
bool check_valid_arguments_processor(void *bool_arg);
bool check_field_expression_processor(void *arg);
bool enumerate_field_refs_processor(void *arg);

View file

@ -949,7 +949,7 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
thd->lex->allow_sum_func= 0;
if (!(error= func_expr->fix_fields(thd, (Item**)&func_expr)))
func_expr->walk(&Item::vcol_in_partition_func_processor, 0, NULL);
func_expr->walk(&Item::post_fix_fields_part_expr_processor, 0, NULL);
/*
Restore agg_field/agg_func and allow_sum_func,