summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2005-09-20 21:20:38 +0300
committerbell@sanja.is.com.ua <>2005-09-20 21:20:38 +0300
commitc1b185f5ff1f1f2141604269a7fe908ca91a8b0c (patch)
tree566c629b6b083a25010a5ecb53445bfe05c48fc6 /sql/log.cc
parentaec371f910c56f03ca108439a1b5d449b1bd9dc3 (diff)
downloadmariadb-git-c1b185f5ff1f1f2141604269a7fe908ca91a8b0c.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.
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;
}