Skip to content

Commit

Permalink
FB8-96: Remove special formatting for user name when writing to audit…
Browse files Browse the repository at this point in the history
… plugin log (#948)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-96

Reference patch: 3b47dae
Reference patch: 87e0683
Pull Request resolved: #948

Reviewed By: lth

Differential Revision: D13941932

Pulled By: lth

fbshipit-source-id: 1435058
  • Loading branch information
dutow authored and facebook-github-bot committed Feb 7, 2019
1 parent 7fa4a11 commit 06b2375
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sql/sql_audit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ int mysql_audit_notify(THD *thd, mysql_event_general_subclass_t subclass,
const char *subclass_name, int error_code,
const char *msg, size_t msg_len) {
mysql_event_general event;
char user_buff[MAX_USER_HOST_SIZE];

DBUG_ASSERT(thd);

Expand All @@ -368,8 +367,8 @@ int mysql_audit_notify(THD *thd, mysql_event_general_subclass_t subclass,

Security_context *sctx = thd->security_context();

event.general_user.str = user_buff;
event.general_user.length = make_user_name(sctx, user_buff);
event.general_user.str = sctx->user().str;
event.general_user.length = sctx->user().str ? sctx->user().length : 0;
event.general_ip = sctx->ip();
event.general_host = sctx->host();
event.general_external_user = sctx->external_user();
Expand Down

0 comments on commit 06b2375

Please sign in to comment.