summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-10-28 00:56:44 +0300
committerunknown <bell@sanja.is.com.ua>2005-10-28 00:56:44 +0300
commitc1852b1202af4ebbde04d5f774458991e024a82a (patch)
tree14421e9e0badef3fc06c123db76b49dc641603b2 /sql/sql_acl.cc
parent4a816ce152105787ed3cd684597c421998c3dbcc (diff)
downloadmariadb-git-c1852b1202af4ebbde04d5f774458991e024a82a.tar.gz
fixe of typos, comments & layout
sql/item_func.cc: fixed typo sql/sql_acl.cc: comment fixed sql/sql_parse.cc: comment fixed sql/sql_view.cc: layout fixed sql/table.cc: typo fixed layout fixed sql/table.h: typo fixed
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 332606771aa..bc8b9ba2efb 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -3522,8 +3522,14 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
DBUG_ASSERT(number > 0);
/*
- Iterate tables until first prelocking placeholder (if this query do not
- have placeholders first_not_own_table is 0)
+ Walk through the list of tables that belong to the query and save the
+ requested access (orig_want_privilege) to be able to use it when
+ checking access rights to the underlying tables of a view. Our grant
+ system gradually eliminates checked bits from want_privilege and thus
+ after all checks are done we can no longer use it.
+ The check that first_not_own_table is not reached is for the case when
+ the given table list refers to the list for prelocking (contains tables
+ of other queries). For simple queries first_not_own_table is 0.
*/
for (i= 0, table= tables;
table && table != first_not_own_table && i < number;