summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-09-15 22:29:07 +0300
committerunknown <bell@sanja.is.com.ua>2005-09-15 22:29:07 +0300
commit84f029a448fc822f2fa150ab13e61b233b1e4027 (patch)
treefc6da649fdbafccdf434cac04cebe418f638185d /sql/log.cc
parentfbe338f4b009c8f0057645bdfae9b981a346dbc3 (diff)
downloadmariadb-git-84f029a448fc822f2fa150ab13e61b233b1e4027.tar.gz
WL#2787 (part 2, ver 3 (merged)) changed securety context switching
libmysqld/lib_sql.cc: changed securety context switching mysql-test/r/rpl_sp.result: now it show real information from changed security context of SP (checked) sql/ha_innodb.cc: changed securety context switching sql/item.cc: changed securety context switching sql/item_func.cc: changed securety context switching sql/item_strfunc.cc: changed securety context switching sql/log.cc: changed securety context switching sql/mysql_priv.h: changed securety context switching sql/mysqld.cc: changed securety context switching sql/repl_failsafe.cc: changed securety context switching sql/set_var.cc: changed securety context switching sql/slave.cc: changed securety context switching sql/sp.cc: changed securety context switching sql/sp_head.cc: changed securety context switching in case of inability to switch context we return error now sql/sp_head.h: changed securety context switching sql/sql_acl.cc: changed securety context switching sql/sql_acl.h: changed securety context switching sql/sql_base.cc: changed securety context switching sql/sql_class.cc: changed securety context switching sql/sql_class.h: changed securety context switching sql/sql_db.cc: changed securety context switching sql/sql_insert.cc: changed securety context switching sql/sql_parse.cc: changed securety context switching sql/sql_show.cc: changed securety context switching sql/sql_trigger.cc: changed securety context switching sql/sql_view.cc: changed securety context switching sql/sql_yacc.yy: changed securety context switching
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 920a3fcff42..032ac392c00 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1476,7 +1476,7 @@ bool MYSQL_LOG::write(THD *thd,enum enum_server_command command,
{ // Normal thread
if ((thd->options & OPTION_LOG_OFF)
#ifndef NO_EMBEDDED_ACCESS_CHECKS
- && (thd->master_access & SUPER_ACL)
+ && (thd->security_ctx->master_access & SUPER_ACL)
#endif
)
{
@@ -1935,10 +1935,12 @@ 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->priv_user ? thd->priv_user : "",
- thd->user ? thd->user : "",
- thd->host ? thd->host : "",
- thd->ip ? thd->ip : "") == (uint) -1)
+ 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 : "") ==
+ (uint) -1)
tmp_errno=errno;
}
if (query_start_arg)