summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2013-06-07 12:10:45 +0400
committerSergey Vojtovich <svoj@mariadb.org>2013-06-07 12:10:45 +0400
commitfb1a8f04ea71e918096ed532e46d59207ee99925 (patch)
tree8250132b2a8de39bce7a2d057d11d4319c79de19 /sql/sp_head.cc
parent4749d40c635634e25e07d28ce1a04e9263bcc375 (diff)
parenteec66e2f655bc976377db7620a884b97acf9618c (diff)
downloadmariadb-git-fb1a8f04ea71e918096ed532e46d59207ee99925.tar.gz
Merge.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 3a761897e90..7e7ea4364e4 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -41,6 +41,7 @@
#include "sql_parse.h" // cleanup_items
#include "sql_base.h" // close_thread_tables
#include "transaction.h" // trans_commit_stmt
+#include "sql_audit.h"
/*
Sufficient max length of printed destinations and frame offsets (all uints).
@@ -3132,6 +3133,10 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
query_cache_end_of_result(thd);
+ mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_STATUS,
+ thd->stmt_da->is_error() ? thd->stmt_da->sql_errno() : 0,
+ command_name[COM_QUERY].str);
+
if (!res && unlikely(thd->enable_slow_log))
log_slow_statement(thd);
}