summaryrefslogtreecommitdiff
path: root/sql/event.cc
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2005-12-20 14:21:02 +0200
committerunknown <andrey@lmy004.>2005-12-20 14:21:02 +0200
commit9b323387b817351caadcdb57b880242081c01abe (patch)
tree1a612497071763ab4b3604da0580a5531f863089 /sql/event.cc
parenta820fa4fb11b8a5b60dbc9b27c18ac9aa973909c (diff)
downloadmariadb-git-9b323387b817351caadcdb57b880242081c01abe.tar.gz
WL #1034 update
- fix one bug found by PeterG, namely bug #51 #there is a major problem currently after removing the specialised DYNAMIC_ARRAY as storage for the events. I have to reintroduce similar storage, this time probably some linked list or maybe some API on top of DYNAMIC_ARRAY. sql/event.cc: close the table sql/event.h: change definition sql/event_executor.cc: don't start the thread in advance sql/event_timed.cc: - don't call evex_drop_event - quote the name during compilation to make create event `the rain in spain goes into the drain` not fail.
Diffstat (limited to 'sql/event.cc')
-rw-r--r--sql/event.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/event.cc b/sql/event.cc
index 365ebcb063f..162c187d091 100644
--- a/sql/event.cc
+++ b/sql/event.cc
@@ -877,7 +877,6 @@ evex_drop_event(THD *thd, event_timed *et, bool drop_if_exists)
{
TABLE *table;
int ret= EVEX_OPEN_TABLE_FAILED;
- bool opened;
DBUG_ENTER("evex_drop_event");
if (evex_open_event_table(thd, TL_WRITE, &table))
@@ -912,11 +911,12 @@ evex_drop_event(THD *thd, event_timed *et, bool drop_if_exists)
ret= evex_remove_from_cache(&et->dbname, &et->name, true);
VOID(pthread_mutex_unlock(&LOCK_evex_running));
-done:
+done:
/*
- No need to close the table, it will be closed in sql_parse::do_command()
- and evex_remove_from_cache does not try to open a table
+ evex_drop_event() is used by event_timed::drop therefore
+ we have to close our thread tables.
*/
+ close_thread_tables(thd);
DBUG_RETURN(ret);
}