summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 2a82b0058da..60c1438b5cf 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -32,6 +32,7 @@
#include "slave.h"
#include <my_bitmap.h>
#include "log_event.h"
+#include "sql_audit.h"
#include <m_ctype.h>
#include <sys/stat.h>
#include <thr_alarm.h>
@@ -524,6 +525,7 @@ THD::THD()
dbug_sentry=THD_SENTRY_MAGIC;
#endif
#ifndef EMBEDDED_LIBRARY
+ mysql_audit_init_thd(this);
net.vio=0;
#endif
client_capabilities= 0; // minimalistic client
@@ -1041,6 +1043,7 @@ THD::~THD()
cleanup();
ha_close_connection(this);
+ mysql_audit_release(this);
plugin_thdvar_cleanup(this);
DBUG_PRINT("info", ("freeing security context"));
@@ -1058,6 +1061,8 @@ THD::~THD()
delete rli_fake;
rli_fake= NULL;
}
+
+ mysql_audit_free_thd(this);
#endif
free_root(&main_mem_root, MYF(0));