diff --git a/sql/item.cc b/sql/item.cc index 9498d816bb0..466ba63b1ce 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -10930,8 +10930,8 @@ void dummy_error_processor(THD *thd, void *data) {} /** - Wrapper of hide_view_error call for Name_resolution_context error - processor. + Wrapper of replace_view_error_with_generic call for Name_resolution_context + error processor. @note hide view underlying tables details in error messages @@ -10939,7 +10939,7 @@ void dummy_error_processor(THD *thd, void *data) void view_error_processor(THD *thd, void *data) { - ((TABLE_LIST *)data)->hide_view_error(thd); + ((TABLE_LIST *)data)->replace_view_error_with_generic(thd); } /** diff --git a/sql/item_func.cc b/sql/item_func.cc index 3ca3d5af3a3..5bea3f440b4 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -7099,7 +7099,7 @@ bool Item_func_nextval::check_access_and_fix_fields(THD *thd, Item **ref, bool error= check_single_table_access(thd, want_access, table_list, false); table_list->sequence= true; if (error && table_list->belong_to_view) - table_list->hide_view_error(thd); + table_list->replace_view_error_with_generic(thd); return error || Item_longlong_func::fix_fields(thd, ref); } diff --git a/sql/sql_base.cc b/sql/sql_base.cc index ac4bce1dce0..ed23208e358 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -8009,7 +8009,7 @@ bool setup_tables_and_check_access(THD *thd, Name_resolution_context *context, if (table_list->belong_to_view && !table_list->view && check_single_table_access(thd, access, table_list, FALSE)) { - tables->hide_view_error(thd); + tables->replace_view_error_with_generic(thd); DBUG_RETURN(TRUE); } access= want_access; diff --git a/sql/sql_update.cc b/sql/sql_update.cc index f2cea510ce7..1327bd786c6 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1684,7 +1684,7 @@ static bool multi_update_check_table_access(THD *thd, TABLE_LIST *table, if (multi_update_check_table_access(thd, tbl, tables_for_update, &updated)) { - tbl->hide_view_error(thd); + tbl->replace_view_error_with_generic(thd); return true; } } diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 89d0704f6df..9df5c89cf37 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -337,7 +337,7 @@ bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view, { if (check_single_table_access(thd, SELECT_ACL, tbl, FALSE)) { - tbl->hide_view_error(thd); + tbl->replace_view_error_with_generic(thd); goto err; } } diff --git a/sql/table.cc b/sql/table.cc index 978dbee254e..1b5d6741b45 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -6065,9 +6065,9 @@ bool TABLE_LIST::prep_check_option(THD *thd, uint8 check_opt_type) @pre This method can be called only if there is an error. */ -void TABLE_LIST::hide_view_error(THD *thd) +void TABLE_LIST::replace_view_error_with_generic(THD *thd) { - if ((thd->killed && !thd->is_error())|| thd->get_internal_handler()) + if ((thd->killed && !thd->is_error()) || thd->get_internal_handler()) return; /* Hide "Unknown column" or "Unknown function" error */ DBUG_ASSERT(thd->is_error()); diff --git a/sql/table.h b/sql/table.h index 981fc5d23c5..eeec8b05022 100644 --- a/sql/table.h +++ b/sql/table.h @@ -2776,7 +2776,7 @@ struct TABLE_LIST bool check_single_table(TABLE_LIST **table, table_map map, TABLE_LIST *view); bool set_insert_values(MEM_ROOT *mem_root); - void hide_view_error(THD *thd); + void replace_view_error_with_generic(THD *thd); TABLE_LIST *find_underlying_table(TABLE *table); TABLE_LIST *first_leaf_for_name_resolution(); TABLE_LIST *last_leaf_for_name_resolution();