1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Backport from 6.0-codebase.

WL#3771
  "Audit Plugin Interface"
  Implement new plug-in type - AUDIT
  New plug-in: audit_null
    simply increments counter for how many times it was called.
This commit is contained in:
Sergey Vojtovich
2009-12-15 23:52:47 +04:00
parent bd1f8f5bfa
commit 94098b22c0
23 changed files with 1133 additions and 237 deletions

View File

@@ -28,6 +28,7 @@
#include "sp_cache.h"
#include "events.h"
#include "sql_trigger.h"
#include "sql_audit.h"
#include "sql_prepare.h"
#include "probes_mysql.h"
@@ -1483,6 +1484,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
/* Free tables */
close_thread_tables(thd);
if (!thd->is_error() && !thd->killed_errno())
{
mysql_audit_general(thd,MYSQL_AUDIT_GENERAL_RESULT,0,my_time(0),
0,0,0,0,
thd->query(), thd->query_length(),
thd->variables.character_set_client,
thd->warning_info->current_row_for_warning());
}
log_slow_statement(thd);
thd_proc_info(thd, "cleaning up");