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 (facebook#948)

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

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

Reviewed By: lth

Differential Revision: D13941932

Pulled By: lth

fbshipit-source-id: a0ff808
  • Loading branch information
dutow authored and inikep committed Jul 29, 2020
1 parent b6bdbbf commit 992251e
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 @@ -364,7 +364,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 @@ -378,8 +377,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 992251e

Please sign in to comment.