summaryrefslogtreecommitdiff
path: root/sql/event_queue.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2010-01-19 17:30:55 +0400
committerSergey Vojtovich <svoj@sun.com>2010-01-19 17:30:55 +0400
commit667b5944a7a28dcefdd725d360b6631bd74aedc8 (patch)
tree667b5c726df9ea2c6435bb9a13fad521165d32ec /sql/event_queue.cc
parenta6165accb3279fe64b672fa0eeaa30ef12cf6557 (diff)
parent9130563708cbdbb488e5361af79eb9f4b9dab0ea (diff)
downloadmariadb-git-667b5944a7a28dcefdd725d360b6631bd74aedc8.tar.gz
Merge backport of WL#3771 with mysql-next-mr.
Diffstat (limited to 'sql/event_queue.cc')
-rw-r--r--sql/event_queue.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/event_queue.cc b/sql/event_queue.cc
index cf63ba937e0..225029040b0 100644
--- a/sql/event_queue.cc
+++ b/sql/event_queue.cc
@@ -16,6 +16,7 @@
#include "mysql_priv.h"
#include "event_queue.h"
#include "event_data_objects.h"
+#include "sql_audit.h"
/**
@addtogroup Event_Scheduler
@@ -581,6 +582,9 @@ Event_queue::get_top_for_execution_if_time(THD *thd,
/* There are no events in the queue */
next_activation_at= 0;
+ /* Release any held audit resources before waiting */
+ mysql_audit_release(thd);
+
/* Wait on condition until signaled. Release LOCK_queue while waiting. */
cond_wait(thd, NULL, queue_empty_msg, SCHED_FUNC, __LINE__);
@@ -600,6 +604,10 @@ Event_queue::get_top_for_execution_if_time(THD *thd,
*/
struct timespec top_time;
set_timespec(top_time, next_activation_at - thd->query_start());
+
+ /* Release any held audit resources before waiting */
+ mysql_audit_release(thd);
+
cond_wait(thd, &top_time, queue_wait_msg, SCHED_FUNC, __LINE__);
continue;