diff options
author | unknown <bell@sanja.is.com.ua> | 2005-10-28 00:56:44 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-10-28 00:56:44 +0300 |
commit | c1852b1202af4ebbde04d5f774458991e024a82a (patch) | |
tree | 14421e9e0badef3fc06c123db76b49dc641603b2 | |
parent | 4a816ce152105787ed3cd684597c421998c3dbcc (diff) | |
download | mariadb-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
-rw-r--r-- | sql/item_func.cc | 2 | ||||
-rw-r--r-- | sql/sql_acl.cc | 10 | ||||
-rw-r--r-- | sql/sql_parse.cc | 5 | ||||
-rw-r--r-- | sql/sql_view.cc | 2 | ||||
-rw-r--r-- | sql/table.cc | 4 | ||||
-rw-r--r-- | sql/table.h | 4 |
6 files changed, 15 insertions, 12 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index fbd13d84c2d..9c1d1f63635 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4983,7 +4983,7 @@ Item_func_sp::fix_fields(THD *thd, Item **ref) creation we do not infer into stored routine bodies and do not check privileges of its statements, which would probably be a good idea especially if the view has SQL SECURITY DEFINER and the used stored - procedure has SQL + procedure has SQL SECURITY DEFINER */ Security_context *save_ctx; if (!(res= find_and_check_access(thd, EXECUTE_ACL, &save_ctx))) 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; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 5b27eafcaff..1882965fd1e 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5029,8 +5029,9 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables, TABLE_LIST *org_tables= tables; TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table(); /* - Iterate tables until first prelocking placeholder (if this query do not - have placeholders first_not_own_table is 0) + 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 (; tables && tables != first_not_own_table; tables= tables->next_global) { diff --git a/sql/sql_view.cc b/sql/sql_view.cc index f123fee9c60..b30f8cb156c 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1139,9 +1139,7 @@ ok2: old_lex->time_zone_tables_used= thd->lex->time_zone_tables_used; thd->lex= old_lex; if (!table->prelocking_placeholder && table->prepare_security(thd)) - { DBUG_RETURN(1); - } DBUG_RETURN(0); diff --git a/sql/table.cc b/sql/table.cc index e1d6f5c7346..75c04389411 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -2419,7 +2419,7 @@ void st_table_list::register_want_access(ulong want_access) /* - Load security context infoemation for this view + Load security context information for this view SYNOPSIS st_table_list::prepare_view_securety_context() @@ -2517,9 +2517,7 @@ bool st_table_list::prepare_security(THD *thd) DBUG_ASSERT(!prelocking_placeholder); if (prepare_view_securety_context(thd)) - { DBUG_RETURN(TRUE); - } thd->security_ctx= find_view_security_context(thd); while ((tbl= tb++)) { diff --git a/sql/table.h b/sql/table.h index aff687077b8..84476670823 100644 --- a/sql/table.h +++ b/sql/table.h @@ -551,12 +551,12 @@ typedef struct st_table_list st_table_list *referencing_view; /* security context (non-zero only for tables which belong - to view with SQL SEURITY DEFINER) + to view with SQL SEQURITY DEFINER) */ Security_context *security_ctx; /* this view security context (non-zero only for views with - SQL SEURITY DEFINER) + SQL SEQURITY DEFINER) */ Security_context *view_sctx; /* |