mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Simple optimization
This commit is contained in:
parent
7e31279666
commit
4193fa7ae2
1 changed files with 4 additions and 5 deletions
|
@ -8225,7 +8225,6 @@ bool setup_tables_and_check_access(THD *thd,
|
|||
ulong want_access,
|
||||
bool full_table_list)
|
||||
{
|
||||
bool first_table= true;
|
||||
DBUG_ENTER("setup_tables_and_check_access");
|
||||
|
||||
if (setup_tables(thd, context, from_clause, tables,
|
||||
|
@ -8234,16 +8233,16 @@ bool setup_tables_and_check_access(THD *thd,
|
|||
|
||||
List_iterator<TABLE_LIST> ti(leaves);
|
||||
TABLE_LIST *table_list;
|
||||
while((table_list= ti++))
|
||||
ulong access= want_access_first;
|
||||
while ((table_list= ti++))
|
||||
{
|
||||
if (table_list->belong_to_view && !table_list->view &&
|
||||
check_single_table_access(thd, first_table ? want_access_first :
|
||||
want_access, table_list, FALSE))
|
||||
check_single_table_access(thd, access, table_list, FALSE))
|
||||
{
|
||||
tables->hide_view_error(thd);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
first_table= 0;
|
||||
access= want_access;
|
||||
}
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue