Commit c1852b12 authored by unknown's avatar unknown

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
parent 4a816ce1
...@@ -4983,7 +4983,7 @@ Item_func_sp::fix_fields(THD *thd, Item **ref) ...@@ -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 creation we do not infer into stored routine bodies and do not check
privileges of its statements, which would probably be a good idea privileges of its statements, which would probably be a good idea
especially if the view has SQL SECURITY DEFINER and the used stored especially if the view has SQL SECURITY DEFINER and the used stored
procedure has SQL procedure has SQL SECURITY DEFINER
*/ */
Security_context *save_ctx; Security_context *save_ctx;
if (!(res= find_and_check_access(thd, EXECUTE_ACL, &save_ctx))) if (!(res= find_and_check_access(thd, EXECUTE_ACL, &save_ctx)))
......
...@@ -3522,8 +3522,14 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables, ...@@ -3522,8 +3522,14 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
DBUG_ASSERT(number > 0); DBUG_ASSERT(number > 0);
/* /*
Iterate tables until first prelocking placeholder (if this query do not Walk through the list of tables that belong to the query and save the
have placeholders first_not_own_table is 0) 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; for (i= 0, table= tables;
table && table != first_not_own_table && i < number; table && table != first_not_own_table && i < number;
......
...@@ -5029,8 +5029,9 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables, ...@@ -5029,8 +5029,9 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
TABLE_LIST *org_tables= tables; TABLE_LIST *org_tables= tables;
TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table(); TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table();
/* /*
Iterate tables until first prelocking placeholder (if this query do not The check that first_not_own_table is not reached is for the case when
have placeholders first_not_own_table is 0) 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) for (; tables && tables != first_not_own_table; tables= tables->next_global)
{ {
......
...@@ -1139,9 +1139,7 @@ ok2: ...@@ -1139,9 +1139,7 @@ ok2:
old_lex->time_zone_tables_used= thd->lex->time_zone_tables_used; old_lex->time_zone_tables_used= thd->lex->time_zone_tables_used;
thd->lex= old_lex; thd->lex= old_lex;
if (!table->prelocking_placeholder && table->prepare_security(thd)) if (!table->prelocking_placeholder && table->prepare_security(thd))
{
DBUG_RETURN(1); DBUG_RETURN(1);
}
DBUG_RETURN(0); DBUG_RETURN(0);
......
...@@ -2419,7 +2419,7 @@ void st_table_list::register_want_access(ulong want_access) ...@@ -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 SYNOPSIS
st_table_list::prepare_view_securety_context() st_table_list::prepare_view_securety_context()
...@@ -2517,9 +2517,7 @@ bool st_table_list::prepare_security(THD *thd) ...@@ -2517,9 +2517,7 @@ bool st_table_list::prepare_security(THD *thd)
DBUG_ASSERT(!prelocking_placeholder); DBUG_ASSERT(!prelocking_placeholder);
if (prepare_view_securety_context(thd)) if (prepare_view_securety_context(thd))
{
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
}
thd->security_ctx= find_view_security_context(thd); thd->security_ctx= find_view_security_context(thd);
while ((tbl= tb++)) while ((tbl= tb++))
{ {
......
...@@ -551,12 +551,12 @@ typedef struct st_table_list ...@@ -551,12 +551,12 @@ typedef struct st_table_list
st_table_list *referencing_view; st_table_list *referencing_view;
/* /*
security context (non-zero only for tables which belong 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; Security_context *security_ctx;
/* /*
this view security context (non-zero only for views with this view security context (non-zero only for views with
SQL SEURITY DEFINER) SQL SEQURITY DEFINER)
*/ */
Security_context *view_sctx; Security_context *view_sctx;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment