summaryrefslogtreecommitdiff
path: root/sql/events.h
Commit message (Collapse)AuthorAgeFilesLines
...
* WL#3337 (Events new architecture)unknown2006-06-281-39/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5th cut, moved DB related code to Event_db_repository and updated accordingly the remanining code. Moved change/restore_security_context() to class THD Removed events_priv.h Next step is to reorganize create/update_event() and parsing for them. But probably some other refactoring could be done in the meanwhile. The changes so far pass the test suite. BitKeeper/deleted/.del-events_priv.h~2e8bce2cf35997df: Delete: sql/events_priv.h sql/Makefile.am: events_priv.h is no more sql/event_data_objects.cc: reorganize events code sql/event_data_objects.h: reorganize events code sql/event_db_repository.cc: reorganize events code sql/event_db_repository.h: reorganize events code sql/event_scheduler.cc: reorganize events code sql/event_scheduler.h: reorganize events code sql/events.cc: reorganize events code sql/events.h: reorganize events code sql/mysqld.cc: reorganize events code sql/set_var.cc: reorganize events code sql/sql_class.cc: add ::change_security_context() and restore_security_context() sql/sql_class.h: add ::change_security_context() and restore_security_context() sql/sql_db.cc: reorganize Events code sql/sql_parse.cc: reorganize Events code sql/sql_show.cc: reorganize Events code
* WL#3337 (Event scheduler new architecture)unknown2006-06-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Third cut to simplify parsing phase. Now DROP EVENT works. Overloaded few functions to be able to use either sp_name or pass two LEX_STRINGs instead of a Event_timed pointer. This is transitional and eventually the old functions will be removed. For now DROP EVENT also works, does not need anymore a parsing object (Event_timed) and definer initialization because everyone who has EVENT_ACL can drop events, and this is checked on execution time in sql_parse.cc from the security context, as it should be. sql/event_data_objects.cc: overload few functions sql/event_scheduler.cc: Event_scheduler::drop_event() actually does not need Event_timed object but just an identifier, hence pass only sp_name. Overloaded Event_scheduler::find_event() to work with sp_name object. Eventually the old version will be removed. This is being done as transitional step to be able to test frequently code. sql/event_scheduler.h: Event_scheduler::drop_event() actually does not need Event_timed object but just an identifier, hence pass only sp_name. Overloaded Event_scheduler::find_event() to work with sp_name object. Eventually the old version will be removed. This is being done as transitional step to be able to test frequently code. sql/events.cc: Change db_drop_event() not to use Event_timed, either coming from parsing or from Event_timed::drop, but use LEX_STRINGs. sp_name is not convinient because in Event_timed::drop a temporary object has to be created. Hence, dereference the sp_name in Events::drop_event() and pass the LEX_STRINGs. sql/events.h: Change db_drop_event() not to use Event_timed, either coming from parsing or from Event_timed::drop, but use LEX_STRINGs. sp_name is not convinient because in Event_timed::drop a temporary object has to be created. Hence, dereference the sp_name in Events::drop_event() and pass the LEX_STRINGs. sql/events_priv.h: Change db_drop_event() not to use Event_timed, either coming from parsing or from Event_timed::drop, but use LEX_STRINGs. sp_name is not convinient because in Event_timed::drop a temporary object has to be created. Hence, dereference the sp_name in Events::drop_event() and pass the LEX_STRINGs. sql/sql_parse.cc: SQLCOM_DROP_EVENT does not need lex->event_parse_data object and is more like SQLCOM_SHOW_CREATE_EVENT. Therefore, move it to the block that handles the latter. sql/sql_yacc.yy: DROP EVENT does not need a parsing object, just a name. Store it as lex->spname. Pretty similar handling to the one of SHOW CREATE EVENT.
* WL#3337 (Events new infrasctructure)unknown2006-06-271-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Second cut of separating parsing phase from execution phase Separate Event_timed from parsing phase and introducing Event_parse_data. sql/event_data_objects.cc: second cut, copy Event_timed::init_body() to Event_parse_data::init_body() Init the body during parsing, everything else keep as a pointer to Item or some other pointer to use for later initialization. sql/event_data_objects.h: get the identifier as sp_name*, later will initialize our structures sql/events.cc: for easy transition add temporarily parse_data, later Event_timed *et will be removed. Do slow transition because Event_timed is so tightly integrated that a front-attack by removing things from this class was unsuccessful. Do things step by step by eliminating dependencies. Hence, the code could be checked with the current test suite too (early testing) sql/events.h: for easy transition add temporarily parse_data, later Event_timed *et will be removed. Do slow transition because Event_timed is so tightly integrated that a front-attack by removing things from this class was unsuccessful. Do things step by step by eliminating dependencies. Hence, the code could be checked with the current test suite too (early testing) BitKeeper/etc/ignore: Added libmysql/viosocket.o.6WmSJk libmysqld/event_data_objects.cc libmysqld/event_db_repository.cc libmysqld/event_queue.cc server-tools/instance-manager/net_serv.cc to the ignore list sql/share/errmsg.txt: remove this message, not used and needed for now sql/sql_lex.h: for easy transition add temporarily parse_data, later Event_timed *et will be removed. Do slow transition because Event_timed is so tightly integrated that a front-attack by removing things from this class was unsuccessful. Do things step by step by eliminating dependencies. Hence, the code could be checked with the current test suite too (early testing) sql/sql_parse.cc: for easy transition add temporarily parse_data, later Event_timed *et will be removed. Do slow transition because Event_timed is so tightly integrated that a front-attack by removing things from this class was unsuccessful. Do things step by step by eliminating dependencies. Hence, the code could be checked with the current test suite too (early testing) sql/sql_yacc.yy: for easy transition add temporarily parse_data, later Event_timed *et will be removed. Do slow transition because Event_timed is so tightly integrated that a front-attack by removing things from this class was unsuccessful. Do things step by step by eliminating dependencies. Hence, the code could be checked with the current test suite too (early testing)
* Reorganize, physically the events codeunknown2006-06-081-0/+97
Unify method naming -> create/update/drop_event Move class Event_timed to event_timed.h class Events is in events.h (renamed from event.h) The implementation is in events.cc (renamed from event.h) BitKeeper/deleted/.del-event_executor.cc~f4a4645b973838ab: Delete: sql/event_executor.cc include/my_time.h: add a boundary libmysqld/CMakeLists.txt: event.cc -> events.cc libmysqld/Makefile.am: event.cc -> event.cc sql/CMakeLists.txt: event.cc -> events.cc sql/Makefile.am: event.cc -> events.cc event_priv.h -> events_priv.h sql/event_scheduler.cc: event.h -> events.h add_event -> create_event replace_event -> update_event() event_timed_compare_q is only used in event_scheduler.cc , so moving it from event.cc and making it static sql/event_scheduler.h: add_event -> create_event replace_event -> update_event sql/event_timed.cc: moved extern interval_type_to_name to mysql_priv.h sql/mysql_priv.h: moved my_time_compare to time.cc sql/mysqld.cc: event.h -> events.h sql/sql_db.cc: event.h -> events.h sql/sql_parse.cc: event.h -> events.h class Event_timed moved to event_timed.h sql/sql_show.cc: event.h -> events.h class Event_timed moved to event_timed.h sql/sql_yacc.yy: event.h -> events.h class Event_timed moved to event_timed.h sql/events.cc: add_event -> create_event replace_event -> update_event event_timed_compare_q moved to event_scheduler.cc sql/events.h: class Event_timed moved to event_timed.h sql/events_priv.h: my_time_compare moved to mysql_priv.h event_timed_compare_q is static in event_scheduler.cc sql/time.cc: moved interval_type_to_name from event.cc to here. BitKeeper/etc/ignore: Added libmysqld/events.cc to the ignore list