summaryrefslogtreecommitdiff
path: root/sql/event_executor.cc
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2006-03-01 02:34:22 +0100
committerunknown <andrey@lmy004.>2006-03-01 02:34:22 +0100
commitd576ca18154392c64b53ff2ed2ab14be3a71d55c (patch)
tree08e923bfbb7001fee0cc29eb19d1f0c315dc87a7 /sql/event_executor.cc
parent11c7dbd3a5956c3ea4b7262389f40f278796a1a3 (diff)
downloadmariadb-git-d576ca18154392c64b53ff2ed2ab14be3a71d55c.tar.gz
fix for bug #16426
Events: Event-caused statements don't appear in the slow query log WL#1034 sql/event_executor.cc: enable slow logging sql/event_timed.cc: enable slow logging for the anonymous SP sql/sp_head.cc: allow thd->enable_slow_log to be TRUE if only m_flags & sp_head::LOG_SLOW_STATEMENTS Because usually enable_slow_log is 1 in user mode, this second check is needed backup the mode otherwise. sql/sp_head.h: add a new constant for slow queries. SP by default does not log slow queries in the body just the whole CALL could be considered as slow if taking too much time and called directly from the user sql/sql_parse.cc: let us see in the the trace log
Diffstat (limited to 'sql/event_executor.cc')
-rw-r--r--sql/event_executor.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/event_executor.cc b/sql/event_executor.cc
index 60e4c11c619..80b145250d1 100644
--- a/sql/event_executor.cc
+++ b/sql/event_executor.cc
@@ -273,7 +273,7 @@ init_event_thread(THD* thd)
my_net_init(&thd->net, 0);
thd->net.read_timeout = slave_net_timeout;
thd->slave_thread= 0;
- thd->options= OPTION_AUTO_IS_NULL;
+ thd->options|= OPTION_AUTO_IS_NULL;
thd->client_capabilities= CLIENT_LOCAL_FILES;
thd->real_id=pthread_self();
VOID(pthread_mutex_lock(&LOCK_thread_count));
@@ -708,6 +708,7 @@ event_executor_worker(void *event_void)
thd= current_thd;
#endif
+ thd->enable_slow_log= TRUE;
{
int ret;
sql_print_information("SCHEDULER: Executing event %s.%s of %s [EXPR:%d]",