summaryrefslogtreecommitdiff
path: root/sql/event_executor.cc
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2006-01-20 22:24:58 +0100
committerunknown <andrey@lmy004.>2006-01-20 22:24:58 +0100
commit3a8e50e082f7e22d5582553a22f3ee1407f6db7f (patch)
tree30a5984004a97c4b00fa61d2266079afb0e1222a /sql/event_executor.cc
parent2dc2a43006a7a84797f45c57c4dead2bfafc13a5 (diff)
downloadmariadb-git-3a8e50e082f7e22d5582553a22f3ee1407f6db7f.tar.gz
fix for bug#16431 (Events: An event which alters itself disappears)
WL#1034 (Internal CRON) mysql-test/r/events.result: add a test for to test bug #16431 mysql-test/t/events.test: results of new tests sql/event.cc: - more debug info - pass info to evex_remove_from_cache() whether the operation was drop or alter. this fixes possible bug that may lead to dropping of an event when it's altered. also fix for bug#16431 sql/event_executor.cc: be more verbose and throw more errors sql/event_timed.cc: - add ` around the names of the db and the event_name and not their concatenation. remove ; from the end - unneeded. this fixes bug #16431, which was failing because after some recursion the query was ending on ;; which is normally an error in the parser because that's the delimiter - more debug info - don't execute lex_end() two times when there's a parse error or thd->is_fatal_error
Diffstat (limited to 'sql/event_executor.cc')
-rw-r--r--sql/event_executor.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/event_executor.cc b/sql/event_executor.cc
index dd426c32545..e655f5890b3 100644
--- a/sql/event_executor.cc
+++ b/sql/event_executor.cc
@@ -492,12 +492,18 @@ event_executor_worker(void *event_void)
sql_print_information(" EVEX EXECUTED event %s.%s [EXPR:%d]. RetCode=%d",
event->dbname.str, event->name.str,
(int) event->expression, ret);
+ if (ret == EVEX_COMPILE_ERROR)
+ sql_print_information(" EVEX COMPILE ERROR for event %s.%s",
+ event->dbname.str, event->name.str);
+
DBUG_PRINT("info", (" EVEX EXECUTED event %s.%s [EXPR:%d]. RetCode=%d",
event->dbname.str, event->name.str,
(int) event->expression, ret));
}
if ((event->flags & EVENT_EXEC_NO_MORE) || event->status==MYSQL_EVENT_DISABLED)
{
+ DBUG_PRINT("event_executor_worker",
+ ("%s exec no more. to drop=%d",event->name.str, event->dropped));
if (event->dropped)
event->drop(thd);
delete event;