diff options
author | Monty <monty@mariadb.org> | 2015-09-27 21:30:18 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-10-05 17:14:13 +0200 |
commit | 4193fa7ae2886b2a3f3effa43c7ebf791f63943d (patch) | |
tree | e41112c3180ea37083687f52236700fcdeebcca7 /sql/sql_base.cc | |
parent | 7e3127966646bca50ae6b8ba44c9aed0a261c482 (diff) | |
download | mariadb-git-4193fa7ae2886b2a3f3effa43c7ebf791f63943d.tar.gz |
Simple optimization
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 9162969e2d5..f4424deb7c1 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -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); } |