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) (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: lloyd

Differential Revision: D13941932

Pulled By: lth
  • Loading branch information
dutow authored and inikep committed Aug 6, 2024
1 parent 967d327 commit ab3074f
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 @@ -962,7 +962,6 @@ int mysql_event_tracking_general_notify(
const char *subclass_name, int error_code, const char *msg,
size_t msg_len) {
mysql_event_tracking_general_data event;
char user_buff[MAX_USER_HOST_SIZE];

assert(thd);

Expand All @@ -979,8 +978,8 @@ int mysql_event_tracking_general_notify(
auto ip = sctx->ip();
auto host = sctx->host();

event.user.str = user_buff;
event.user.length = make_user_name(sctx, user_buff);
event.user.str = sctx->user().str;
event.user.length = sctx->user().str ? sctx->user().length : 0;
event.ip = {ip.str, ip.length};
event.host = {host.str, host.length};

Expand Down

0 comments on commit ab3074f

Please sign in to comment.