Commit 4193fa7a authored by Monty's avatar Monty Committed by Sergei Golubchik

Simple optimization

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