Commit c14c958c authored by Sergei Golubchik's avatar Sergei Golubchik

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
parent 445ac662
...@@ -5761,18 +5761,11 @@ bool Item_field::fix_fields(THD *thd, Item **reference) ...@@ -5761,18 +5761,11 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
return TRUE; return TRUE;
} }
/* bool Item_field::post_fix_fields_part_expr_processor(void *int_arg)
@brief
Mark virtual columns as used in a partitioning expression
*/
bool Item_field::vcol_in_partition_func_processor(void *int_arg)
{ {
DBUG_ASSERT(fixed); DBUG_ASSERT(fixed);
if (field->vcol_info) if (field->vcol_info)
{
field->vcol_info->mark_as_in_partitioning_expr(); field->vcol_info->mark_as_in_partitioning_expr();
}
return FALSE; return FALSE;
} }
......
...@@ -1676,7 +1676,7 @@ class Item: public Value_source, ...@@ -1676,7 +1676,7 @@ class Item: public Value_source,
fields. fields.
*/ */
virtual bool check_partition_func_processor(void *arg) { return 1;} 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; } virtual bool rename_fields_processor(void *arg) { return 0; }
/** Processor used to check acceptability of an item in the defining /** Processor used to check acceptability of an item in the defining
expression for a virtual column expression for a virtual column
...@@ -2649,7 +2649,7 @@ class Item_field :public Item_ident ...@@ -2649,7 +2649,7 @@ class Item_field :public Item_ident
bool register_field_in_write_map(void *arg); bool register_field_in_write_map(void *arg);
bool register_field_in_bitmap(void *arg); bool register_field_in_bitmap(void *arg);
bool check_partition_func_processor(void *int_arg) {return FALSE;} 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_valid_arguments_processor(void *bool_arg);
bool check_field_expression_processor(void *arg); bool check_field_expression_processor(void *arg);
bool enumerate_field_refs_processor(void *arg); bool enumerate_field_refs_processor(void *arg);
......
...@@ -949,7 +949,7 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table, ...@@ -949,7 +949,7 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
thd->lex->allow_sum_func= 0; thd->lex->allow_sum_func= 0;
if (!(error= func_expr->fix_fields(thd, (Item**)&func_expr))) 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, Restore agg_field/agg_func and allow_sum_func,
......
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