diff options
author | unknown <timour@mysql.com> | 2005-11-30 21:27:11 +0200 |
---|---|---|
committer | unknown <timour@mysql.com> | 2005-11-30 21:27:11 +0200 |
commit | e486fe1ff18796792fac56ca5425733fb0f68692 (patch) | |
tree | 7bdffd4813f1f558ecae86cf758e9b8b55b92895 /sql/sql_acl.h | |
parent | 4fd41f7c0bd7e61265e219aecada2e7b36df88c3 (diff) | |
download | mariadb-git-e486fe1ff18796792fac56ca5425733fb0f68692.tar.gz |
WL#2486 - natural/using joins according to SQL:2003
Post-review fixes that simplify the way access rights
are checked during name resolution and factor out all
entry points to check access rights into one single
function.
sql/item.cc:
Simplfied find_field_in_table - factored out all acces right checks
into a separate function.
sql/mysql_priv.h:
Simplified the way we control whether to perform access right
checks for columns.
sql/sql_acl.cc:
- Added new functon check_column_grant_in_table_ref that serves as a single
point of entry to check access rights during name resolution for different
kinds of table references.
- Moved check_grant_column_in_sctx to sql_acl.cc where it
logically belongs.
- Removed the parameter check_grants - it is checked before
calling the function.
sql/sql_acl.h:
- Added new function check_column_grant_in_table_ref.
- Made check_grant_column_in_sctx available to other modules.
sql/sql_base.cc:
- Factored out all code that check access rights for columns during
name resolution into one function - check_column_grant_in_table_ref.
- Moved check_grant_column_in_sctx to sql_acl.cc where it
logically belongs.
- Removed the parameter check_grants - it is checked before
calling the function.
sql/table.cc:
Removed code that duplicates the functionality of
check_column_grant_in_table_ref, and called directly
that function.
sql/table.h:
check_grants method is replaced by more general
check_column_grant_in_table_ref.
Diffstat (limited to 'sql/sql_acl.h')
-rw-r--r-- | sql/sql_acl.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_acl.h b/sql/sql_acl.h index 0e50737f84c..c8fadb73b0c 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -204,7 +204,9 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables, uint show_command, uint number, bool dont_print_error); bool check_grant_column (THD *thd, GRANT_INFO *grant, const char *db_name, const char *table_name, - const char *name, uint length, uint show_command=0); + const char *name, uint length, Security_context *sctx); +bool check_column_grant_in_table_ref(THD *thd, TABLE_LIST * table_ref, + const char *name, uint length); bool check_grant_all_columns(THD *thd, ulong want_access, GRANT_INFO *grant, const char* db_name, const char *table_name, Field_iterator *fields); |