Skip to content

Commit be8c587

Browse files
committed
Add row information to STATUS logs
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
1 parent 5954fa3 commit be8c587

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

sql/sql_audit.h

+2-10
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,8 @@ void mysql_audit_general(THD *thd, uint event_subtype,
189189
query= thd->query_string;
190190
user= user_buff;
191191
userlen= make_user_name(thd, user_buff);
192-
if (event_subtype == MYSQL_AUDIT_GENERAL_STATUS)
193-
{
194-
affectrows= 0;
195-
resultrows= 0;
196-
}
197-
else
198-
{
199-
affectrows= thd->get_row_count_func();
200-
resultrows= thd->get_sent_row_count();
201-
}
192+
affectrows= thd->get_row_count_func();
193+
resultrows= thd->get_sent_row_count();
202194
ip.str= (char *) thd->security_ctx->get_ip()->ptr();
203195
ip.length= thd->security_ctx->get_ip()->length();
204196
host.str= (char *) thd->security_ctx->get_host()->ptr();

0 commit comments

Comments
 (0)