1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

cleanup: rename hide_view_error->replace_view_error_with_generic

as requested by Monty
This commit is contained in:
Sergei Golubchik
2025-04-17 17:08:04 +02:00
parent f99586668a
commit 7f1492d0bc
7 changed files with 10 additions and 10 deletions

View File

@@ -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);
}
/**

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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());

View File

@@ -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();