diff options
author | andrey@lmy004. <> | 2006-07-11 18:28:15 +0200 |
---|---|---|
committer | andrey@lmy004. <> | 2006-07-11 18:28:15 +0200 |
commit | 0d517461f0e6b465e0d7f9bc4a5b9241f7cbb657 (patch) | |
tree | f2fc5508efd161a1ef60e481f22fe90017197fa1 /sql/event_data_objects.h | |
parent | 2f7555b30822a7a04f8037b4a5c092625f194ffc (diff) | |
download | mariadb-git-0d517461f0e6b465e0d7f9bc4a5b9241f7cbb657.tar.gz |
WL#3337 (Event scheduler new architecture)
More small fixes to the API : use LEX_STRING instead of LEX_STRING* and if error
then return bool(true) instead of error code.
Merged functions. Reduced usage of sp_name.
Fixed a lot of function documentation errors.
Added function documentation wherever needed.
Removed some unused defines and error codes.
Next to come is batch rename of Event_scheduler_ng to Event_scheduler.
Diffstat (limited to 'sql/event_data_objects.h')
-rw-r--r-- | sql/event_data_objects.h | 52 |
1 files changed, 16 insertions, 36 deletions
diff --git a/sql/event_data_objects.h b/sql/event_data_objects.h index d405cafe42d..e20d698161e 100644 --- a/sql/event_data_objects.h +++ b/sql/event_data_objects.h @@ -17,45 +17,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define EVEX_OK 0 -#define EVEX_KEY_NOT_FOUND -1 -#define EVEX_OPEN_TABLE_FAILED -2 -#define EVEX_WRITE_ROW_FAILED -3 -#define EVEX_DELETE_ROW_FAILED -4 -#define EVEX_GET_FIELD_FAILED -5 -#define EVEX_PARSE_ERROR -6 -#define EVEX_INTERNAL_ERROR -7 -#define EVEX_NO_DB_ERROR -8 -#define EVEX_COMPILE_ERROR -19 -#define EVEX_GENERAL_ERROR -20 -#define EVEX_BAD_IDENTIFIER -21 -#define EVEX_BODY_TOO_LONG -22 -#define EVEX_BAD_PARAMS -23 -#define EVEX_NOT_RUNNING -24 -#define EVEX_MICROSECOND_UNSUP -25 -#define EVEX_CANT_KILL -26 - -#define EVENT_EXEC_NO_MORE (1L << 0) -#define EVENT_NOT_USED (1L << 1) -#define EVENT_FREE_WHEN_FINISHED (1L << 2) - - -#define EVENT_EXEC_STARTED 0 -#define EVENT_EXEC_ALREADY_EXEC 1 -#define EVENT_EXEC_CANT_FORK 2 +#define EVEX_GET_FIELD_FAILED -2 +#define EVEX_COMPILE_ERROR -3 +#define EVEX_GENERAL_ERROR -4 +#define EVEX_BAD_PARAMS -5 +#define EVEX_MICROSECOND_UNSUP -6 class sp_head; class Sql_alloc; -class Event_basic; -/* Compares only the schema part of the identifier */ -bool -event_basic_db_equal( LEX_STRING *db, Event_basic *et); - -/* Compares the whole identifier*/ -bool -event_basic_identifier_equal(LEX_STRING db, LEX_STRING name, Event_basic *b); class Event_basic { @@ -206,7 +177,7 @@ public: load_from_row(TABLE *table); int - execute(THD *thd, MEM_ROOT *mem_root); + execute(THD *thd); private: int get_fake_create_event(THD *thd, String *buf); @@ -274,7 +245,7 @@ public: private: - int + void init_definer(THD *thd); void @@ -303,4 +274,13 @@ private: }; +/* Compares only the schema part of the identifier */ +bool +event_basic_db_equal(LEX_STRING db, Event_basic *et); + +/* Compares the whole identifier*/ +bool +event_basic_identifier_equal(LEX_STRING db, LEX_STRING name, Event_basic *b); + + #endif /* _EVENT_DATA_OBJECTS_H_ */ |