summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-09-20 21:20:38 +0300
committerunknown <bell@sanja.is.com.ua>2005-09-20 21:20:38 +0300
commit3fe752f527895bcd6b32f9cf7f1dcd983d4b4313 (patch)
tree566c629b6b083a25010a5ecb53445bfe05c48fc6 /sql/log.cc
parent84f029a448fc822f2fa150ab13e61b233b1e4027 (diff)
downloadmariadb-git-3fe752f527895bcd6b32f9cf7f1dcd983d4b4313.tar.gz
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
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 032ac392c00..8010d03b46a 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1915,6 +1915,7 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
}
if (!(specialflag & SPECIAL_SHORT_LOG_FORMAT) || query_start_arg)
{
+ Security_context *sctx= thd->security_ctx;
current_time=time(NULL);
if (current_time != last_time)
{
@@ -1935,11 +1936,11 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
tmp_errno=errno;
}
if (my_b_printf(&log_file, "# User@Host: %s[%s] @ %s [%s]\n",
- thd->security_ctx->priv_user ?
- thd->security_ctx->priv_user : "",
- thd->security_ctx->user ? thd->security_ctx->user : "",
- thd->security_ctx->host ? thd->security_ctx->host : "",
- thd->security_ctx->ip ? thd->security_ctx->ip : "") ==
+ sctx->priv_user ?
+ sctx->priv_user : "",
+ sctx->user ? sctx->user : "",
+ sctx->host ? sctx->host : "",
+ sctx->ip ? sctx->ip : "") ==
(uint) -1)
tmp_errno=errno;
}