From 92265da9d77bc750eb234cfac9d6239675078983 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Mon, 9 Sep 2013 16:56:35 +0500 Subject: MDEV-4472 Audit-plugin. Server-related part of the task. file_logger became the service. Data like query_id now are sent to the audit plugin. Fix for MDEV-4770 ported from 10.0. Fix added for the read_maria_plugin_info(). Log rotation can be disabled with 'set rotations=0'. --- sql/sql_audit.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/sql_audit.cc') diff --git a/sql/sql_audit.cc b/sql/sql_audit.cc index 8e17f49df28..abf448fdac4 100644 --- a/sql/sql_audit.cc +++ b/sql/sql_audit.cc @@ -82,6 +82,9 @@ static void general_class_handler(THD *thd, uint event_subtype, va_list ap) event.general_query_length= va_arg(ap, unsigned int); event.general_charset= va_arg(ap, struct charset_info_st *); event.general_rows= (unsigned long long) va_arg(ap, ha_rows); + event.database= va_arg(ap, const char *); + event.database_length= va_arg(ap, unsigned int); + event.query_id= (unsigned long long) thd->query_id; event_class_dispatch(thd, MYSQL_AUDIT_GENERAL_CLASS, &event); } @@ -131,6 +134,7 @@ static void table_class_handler(THD *thd, uint event_subclass, va_list ap) event.new_database_length= va_arg(ap, unsigned int); event.new_table= va_arg(ap, const char *); event.new_table_length= va_arg(ap, unsigned int); + event.query_id= (unsigned long long) thd->query_id; event_class_dispatch(thd, MYSQL_AUDIT_TABLE_CLASS, &event); } -- cgit v1.2.1