mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Simple optimization
This commit is contained in:
@@ -8225,7 +8225,6 @@ bool setup_tables_and_check_access(THD *thd,
|
|||||||
ulong want_access,
|
ulong want_access,
|
||||||
bool full_table_list)
|
bool full_table_list)
|
||||||
{
|
{
|
||||||
bool first_table= true;
|
|
||||||
DBUG_ENTER("setup_tables_and_check_access");
|
DBUG_ENTER("setup_tables_and_check_access");
|
||||||
|
|
||||||
if (setup_tables(thd, context, from_clause, tables,
|
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);
|
List_iterator<TABLE_LIST> ti(leaves);
|
||||||
TABLE_LIST *table_list;
|
TABLE_LIST *table_list;
|
||||||
|
ulong access= want_access_first;
|
||||||
while ((table_list= ti++))
|
while ((table_list= ti++))
|
||||||
{
|
{
|
||||||
if (table_list->belong_to_view && !table_list->view &&
|
if (table_list->belong_to_view && !table_list->view &&
|
||||||
check_single_table_access(thd, first_table ? want_access_first :
|
check_single_table_access(thd, access, table_list, FALSE))
|
||||||
want_access, table_list, FALSE))
|
|
||||||
{
|
{
|
||||||
tables->hide_view_error(thd);
|
tables->hide_view_error(thd);
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
first_table= 0;
|
access= want_access;
|
||||||
}
|
}
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user