summaryrefslogtreecommitdiff
path: root/sql/sql_audit.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-06-26 20:06:12 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-05 17:15:58 +0200
commit2bf017c210d00e3cea281aee9f241a01a3f85b7f (patch)
tree48da932e4db5f284ff24743f1a7f73594676af56 /sql/sql_audit.h
parent47687eef41b97edac423b4ff694cdd20cf804901 (diff)
downloadmariadb-git-2bf017c210d00e3cea281aee9f241a01a3f85b7f.tar.gz
MDEV-13060 Server Audit Plugin Crashes with AWS KMS plugin
don't do auditing if thd is NULL. Collaterals: * copy-paste bugs server_audit.c * uninitialized user field when thd in NULL
Diffstat (limited to 'sql/sql_audit.h')
-rw-r--r--sql/sql_audit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_audit.h b/sql/sql_audit.h
index 5f530c676c3..f7ad8d3cd20 100644
--- a/sql/sql_audit.h
+++ b/sql/sql_audit.h
@@ -170,6 +170,8 @@ void mysql_audit_general(THD *thd, uint event_subtype,
}
else
{
+ event.general_user= NULL;
+ event.general_user_length= 0;
event.general_thread_id= 0;
event.general_query= NULL;
event.general_query_length= 0;