From c14c958c6cd00296cccc10ce523248130be65ec5 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 14 May 2018 21:05:51 +0200 Subject: [PATCH] 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 --- sql/item.cc | 9 +-------- sql/item.h | 4 ++-- sql/sql_partition.cc | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sql/item.cc b/sql/item.cc index 876472c0bd9..fbc4ec22c6e 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -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; } diff --git a/sql/item.h b/sql/item.h index 6f6b8bf08ec..423ee4cc089 100644 --- a/sql/item.h +++ b/sql/item.h @@ -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); diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 4c91f781c2e..f5467e85f62 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -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,