summaryrefslogtreecommitdiff
path: root/sql/event.cc
diff options
context:
space:
mode:
authorandrey@lmy004. <>2005-12-15 14:12:28 +0100
committerandrey@lmy004. <>2005-12-15 14:12:28 +0100
commit533180d76c81db1e396d14b43bed9f42495c78c5 (patch)
tree579217e6afc4bc4bd66d6c99c412035d7f5d7389 /sql/event.cc
parentfd0613f59ed49ae1608b1032764669fb8d329ec0 (diff)
downloadmariadb-git-533180d76c81db1e396d14b43bed9f42495c78c5.tar.gz
WL#1034 update
- fix EVENT_ACL problem that GRANT ALL on some_db.* to someone@somewhere did not get to mysql.db - fix crash when the following is executed : CREATE EVENT P() CREATE EVENT E ON SCHEDULER 1 SECOND DO ROLLBACK; (creation works as well as calling P() which creates the event).
Diffstat (limited to 'sql/event.cc')
-rw-r--r--sql/event.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/event.cc b/sql/event.cc
index 806780e5097..5425b676b60 100644
--- a/sql/event.cc
+++ b/sql/event.cc
@@ -652,6 +652,7 @@ evex_load_and_compile_event(THD * thd, sp_name *spn, bool use_lock)
int ret= 0;
MEM_ROOT *tmp_mem_root;
event_timed *ett;
+ Open_tables_state backup;
DBUG_ENTER("db_load_and_compile_event");
DBUG_PRINT("enter", ("name: %*s", spn->m_name.length, spn->m_name.str));
@@ -659,10 +660,12 @@ evex_load_and_compile_event(THD * thd, sp_name *spn, bool use_lock)
tmp_mem_root= thd->mem_root;
thd->mem_root= &evex_mem_root;
+ thd->reset_n_backup_open_tables_state(&backup);
// no need to use my_error() here because db_find_event() has done it
if ((ret= db_find_event(thd, spn, &ett, NULL)))
goto done;
+ thd->restore_backup_open_tables_state(&backup);
/*
allocate on evex_mem_root. if you call without evex_mem_root
then sphead will not be cleared!