diff options
author | unknown <andrey@lmy004.> | 2006-06-29 00:42:25 +0200 |
---|---|---|
committer | unknown <andrey@lmy004.> | 2006-06-29 00:42:25 +0200 |
commit | 9fa9378b2e5713250e1262879c7bc4d999e1bb40 (patch) | |
tree | 068608d07a92fd7d98e1c7f13c7b9dc9a3167f37 /sql/event_scheduler.h | |
parent | 739ea377bd702a6438d1491222e8ec671ad0fbf3 (diff) | |
download | mariadb-git-9fa9378b2e5713250e1262879c7bc4d999e1bb40.tar.gz |
WL#3337 (Events new architecture)
This cut No 7 should finish the part of fixing the parsing of the events :
- Event_timed is no more used during parsing. Less problems because it has
a mutex. Event_parse_data class is used during parsing. It is suited only
for this purpose. It's pretty lightweight
- Late checking of data from parsing is being performed. This should solve
the problems of nested events in SP or other events (for the situation
of no nested bodies). Before if an ALTER EVENT was in a SP, then when the
SP was compiled, and not executed, the actual init_xxx methods of Event_timed
were called, which is wrong.
- It could be a side effect of using a specialized class, but test events_stress is
now 25% quicker.
Cut No8 will start splitting Event_scheduler into 2 parts, the QUEUE will be moved
to Event_queue.
mysql-test/r/events.result:
update result
mysql-test/t/events.test:
disabled is actually wrong, should be disable, but because of the early
checking it was never parsed.
sql/event_data_objects.cc:
move add init_xxx methods from Event_timed to Event_parse_data
Event_parse data does not need definer_user and definer_host
in Event_timed::compile() do not use lex.et, well there is no more lex.et :)
sql/event_data_objects.h:
move parsing responsibilities from Event_timed to Event_parse_data
sql/event_db_repository.cc:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/event_db_repository.h:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/event_scheduler.cc:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/event_scheduler.h:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/events.cc:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/events.h:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/sql_lex.cc:
lex->et_compile_phase and lex->et are no more.
Use lex->event_parse_data
sql/sql_lex.h:
lex->et_compile_phase and lex->et are no more.
Use lex->event_parse_data
sql/sql_parse.cc:
lex->et_compile_phase and lex->et are no more.
Use lex->event_parse_data
ACL checks were moved inside the Events subsystem.
Also ending of the transaction is performed only just
before doing disk operation. Therefore only when needed.
sql/sql_yacc.yy:
lex->et and lex->et_parse_phase are no more
Use the specialized for parsing Event_parse_data
Diffstat (limited to 'sql/event_scheduler.h')
-rw-r--r-- | sql/event_scheduler.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sql/event_scheduler.h b/sql/event_scheduler.h index bd099d10839..a274636b38b 100644 --- a/sql/event_scheduler.h +++ b/sql/event_scheduler.h @@ -57,11 +57,11 @@ public: /* Methods for queue management follow */ int - create_event(THD *thd, Event_timed *et, bool check_existence); + create_event(THD *thd, Event_parse_data *et, bool check_existence); int - update_event(THD *thd, Event_timed *et, LEX_STRING *new_schema, - LEX_STRING *new_name); + update_event(THD *thd, Event_parse_data *et, LEX_STRING *new_schema, + LEX_STRING *new_name); bool drop_event(THD *thd, sp_name *name); @@ -129,10 +129,7 @@ public: private: Event_timed * - find_event(Event_timed *etn, bool remove_from_q); - - Event_timed * - find_event(sp_name *name, bool remove_from_q); + find_event(LEX_STRING db, LEX_STRING name, bool remove_from_q); uint workers_count(); |