Skip to content

Commit

Permalink
Add row information to STATUS logs
Browse files Browse the repository at this point in the history
Summary:
The audit plugin requires that row information be included in the STATUS log lines. Previously, they were only present in the RESULT logs, but we wanted to merge STATUS and RESULT so that we're not emitting too much redundant information.

Squash with: https://reviews.facebook.net/D49329

Test Plan:
mtr

Also, tested with audit plugin.

Reviewers: jkedgar

Reviewed By: jkedgar

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D58419
  • Loading branch information
lth committed May 19, 2016
1 parent 5954fa3 commit be8c587
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions sql/sql_audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,8 @@ void mysql_audit_general(THD *thd, uint event_subtype,
query= thd->query_string;
user= user_buff;
userlen= make_user_name(thd, user_buff);
if (event_subtype == MYSQL_AUDIT_GENERAL_STATUS)
{
affectrows= 0;
resultrows= 0;
}
else
{
affectrows= thd->get_row_count_func();
resultrows= thd->get_sent_row_count();
}
affectrows= thd->get_row_count_func();
resultrows= thd->get_sent_row_count();
ip.str= (char *) thd->security_ctx->get_ip()->ptr();
ip.length= thd->security_ctx->get_ip()->length();
host.str= (char *) thd->security_ctx->get_host()->ptr();
Expand Down

0 comments on commit be8c587

Please sign in to comment.