Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FB8-96: Remove special formatting for user name when writing to audit plugin log #948

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = thd->security_context()->user().str;
event.general_user.length = thd->security_context()->user().str ? thd->security_context()->user().length : 0;
event.general_ip = sctx->ip();
event.general_host = sctx->host();
event.general_external_user = sctx->external_user();
Expand Down