1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

WL#2787 (Add view definer/owner to the view definition (.frm) to check privileges on used tables and stored routines when using a VIEW.)

Part 2 postreview fixes.


sql/ha_innodb.cc:
  Renamed structure st_security_context to class Security_context
sql/item_func.cc:
  Renamed structure st_security_context to class Security_context
sql/item_strfunc.cc:
  fixed USER() function
sql/log.cc:
  variable used to optimize access to security context
sql/mysql_priv.h:
  Renamed structure st_security_context to class Security_context
sql/mysqld.cc:
  main security context used direcly
sql/sp_head.cc:
  Renamed structure st_security_context to class Security_context
  removed unneed variable
sql/sp_head.h:
  Comment inmroved
  Renamed structure st_security_context to class Security_context
sql/sql_acl.cc:
  Renamed structure st_security_context to class Security_context
  fixed function comment and return value
  variable used to optimize access to security context
  Renamed method of Security_ontext
sql/sql_acl.h:
  fixed return value type
sql/sql_class.cc:
  Renamed structure st_security_context to class Security_context
sql/sql_class.h:
  Renamed structure st_security_context to class Security_context
  Method renamed
sql/sql_db.cc:
  Renamed structure st_security_context to class Security_context
  fixed layout
sql/sql_parse.cc:
  registration of wanted access for underlying tables
sql/sql_show.cc:
  Renamed structure st_security_context to class Security_context
  fixed layout
sql/sql_yacc.yy:
  Renamed structure st_security_context to class Security_context
This commit is contained in:
unknown
2005-09-20 21:20:38 +03:00
parent 84f029a448
commit 3fe752f527
16 changed files with 151 additions and 120 deletions

View File

@@ -1093,7 +1093,7 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
bool system_db= 0;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
ulong db_access;
st_security_context *sctx= thd->security_ctx;
Security_context *sctx= thd->security_ctx;
#endif
DBUG_ENTER("mysql_change_db");
DBUG_PRINT("enter",("name: '%s'",name));
@@ -1131,7 +1131,7 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (!no_access_check)
{
if (test_all_bits(sctx->master_access,DB_ACLS))
if (test_all_bits(sctx->master_access, DB_ACLS))
db_access=DB_ACLS;
else
db_access= (acl_get(sctx->host, sctx->ip, sctx->priv_user, dbname, 0) |
@@ -1166,7 +1166,7 @@ end:
thd->db_length=db_length;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (!no_access_check)
sctx->db_access=db_access;
sctx->db_access= db_access;
#endif
if (system_db)
{