diff options
author | Sergey Vojtovich <svoj@sun.com> | 2009-12-16 15:56:36 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2009-12-16 15:56:36 +0400 |
commit | da31abf8edf986e1c818cb255d23717a445c39c0 (patch) | |
tree | 8df7485477b00a145ea370f2c5fa7822e249b010 /sql/log.cc | |
parent | 94098b22c04d94138b71398172a819308bca0338 (diff) | |
download | mariadb-git-da31abf8edf986e1c818cb255d23717a445c39c0.tar.gz |
Backport from 6.0-codebase.
Bug #36098 Audit plugin (wl 3771) feature disabled in 6.0
avoid recusrive locking of LOCK_plugin
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/sql/log.cc b/sql/log.cc index ce309a0d1b2..267ca90db29 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -43,7 +43,6 @@ /* max size of the log message */ #define MAX_LOG_BUFFER_SIZE 1024 -#define MAX_USER_HOST_SIZE 512 #define MAX_TIME_SIZE 32 #define MY_OFF_T_UNDEF (~(my_off_t)0UL) @@ -1069,7 +1068,6 @@ bool LOGGER::general_log_write(THD *thd, enum enum_server_command command, bool error= FALSE; Log_event_handler **current_handler= general_log_handler_list; char user_host_buff[MAX_USER_HOST_SIZE + 1]; - Security_context *sctx= thd->security_ctx; uint user_host_len= 0; time_t current_time; @@ -1081,21 +1079,15 @@ bool LOGGER::general_log_write(THD *thd, enum enum_server_command command, unlock(); return 0; } - user_host_len= strxnmov(user_host_buff, MAX_USER_HOST_SIZE, - sctx->priv_user ? sctx->priv_user : "", "[", - sctx->user ? sctx->user : "", "] @ ", - sctx->host ? sctx->host : "", " [", - sctx->ip ? sctx->ip : "", "]", NullS) - - user_host_buff; + user_host_len= make_user_name(thd, user_host_buff); current_time= my_time(0); - mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_LOG, 0, current_time, - user_host_buff, user_host_len, - command_name[(uint) command].str, - command_name[(uint) command].length, - query, query_length, - thd->variables.character_set_client,0); + mysql_audit_general_log(thd, current_time, + user_host_buff, user_host_len, + command_name[(uint) command].str, + command_name[(uint) command].length, + query, query_length); while (*current_handler) error|= (*current_handler++)-> |