summaryrefslogtreecommitdiff
path: root/sql/event_timed.cc
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2005-12-08 15:34:11 +0100
committerunknown <andrey@lmy004.>2005-12-08 15:34:11 +0100
commitc1cb8db8cacf5f7e8f97457690a96da441a320a4 (patch)
treead5c936acb2f58110092a44c624c0e30eb0941c2 /sql/event_timed.cc
parentfaa8995e7a4b9504a7f02ef69761f5064f388127 (diff)
downloadmariadb-git-c1cb8db8cacf5f7e8f97457690a96da441a320a4.tar.gz
- last bits of unneeded error checking in sql_parse.cc thrown away
- fix a bug introduced with last commit ALTER EVENT a RENAME TO b; failed - misc sql/event.cc: - rename evex_db_find_routine_aux() to evex_db_find_event_aux() (better name) - change parameter order of db_update_event() - last bits to handle errors as close as possible to the place they occur - fix a bug introduced with last commit: first check for overwriting and event and then check whether the original one exists sql/event.h: add a new error code returned by event_timed::compile() in case of error sql/event_priv.h: rename sql/event_timed.cc: - function rename - add a bit of doc sql/share/errmsg.txt: - extend an error message so it's more informative - add a new error message sql/sql_parse.cc: refactor the cases for CREATE/ALTER/DROP event so use as much common code as possible. last bits of error checking unneeded in sql_parse.cc thrwon out.
Diffstat (limited to 'sql/event_timed.cc')
-rw-r--r--sql/event_timed.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/event_timed.cc b/sql/event_timed.cc
index 8d494a921f0..ff52c99cb50 100644
--- a/sql/event_timed.cc
+++ b/sql/event_timed.cc
@@ -740,7 +740,7 @@ event_timed::update_fields(THD *thd)
if (!(table= evex_open_event_table(thd, TL_WRITE)))
DBUG_RETURN(SP_OPEN_TABLE_FAILED);
- if ((ret= evex_db_find_routine_aux(thd, dbname, name, table)))
+ if ((ret= evex_db_find_event_aux(thd, dbname, name, table)))
goto done;
store_record(table,record[1]);
@@ -893,6 +893,14 @@ done:
}
+/*
+ Returns
+ 0 - Success
+ EVEX_COMPILE_ERROR - Error during compilation
+
+*/
+
+
int
event_timed::compile(THD *thd, MEM_ROOT *mem_root)
{
@@ -936,7 +944,7 @@ event_timed::compile(THD *thd, MEM_ROOT *mem_root)
// QQ: anything else ?
lex_end(&lex);
thd->lex= old_lex;
- DBUG_RETURN(-1);
+ DBUG_RETURN(EVEX_COMPILE_ERROR);
}
sphead= lex.sphead;