1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00
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
This commit is contained in:
unknown
2006-03-01 02:34:22 +01:00
parent 11c7dbd3a5
commit d576ca1815
8 changed files with 140 additions and 4 deletions

View File

@ -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]",