diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2013-09-09 16:56:35 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2013-09-09 16:56:35 +0500 |
commit | 92265da9d77bc750eb234cfac9d6239675078983 (patch) | |
tree | f6ca280d04ecfdbeaf2a773f654d002231f2002f /sql/sql_audit.cc | |
parent | 1e24cdc85be16d08bb079979ab5131e311542b80 (diff) | |
download | mariadb-git-92265da9d77bc750eb234cfac9d6239675078983.tar.gz |
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'.
Diffstat (limited to 'sql/sql_audit.cc')
-rw-r--r-- | sql/sql_audit.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |