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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user