diff options
author | unknown <andrey@lmy004.> | 2006-07-05 17:12:50 +0200 |
---|---|---|
committer | unknown <andrey@lmy004.> | 2006-07-05 17:12:50 +0200 |
commit | b9a7fe2757d9040296311e96a9e2740416d181f2 (patch) | |
tree | b703fe1427d5c31cc528ae515b4514eeb6c9dce8 /sql/event_data_objects.h | |
parent | a5dfeb02e991e6e5e9e332443522de1bb4592df8 (diff) | |
download | mariadb-git-b9a7fe2757d9040296311e96a9e2740416d181f2.tar.gz |
WL#3337 (Event scheduler new architecture)
Cleaned up the code a bit. Fixed few leaks.
This code still does not load events on server startup
from disk. The problem is that there is a need for a THD instance, which
does not exist during server boot. This will be solved soon.
Still Event_timed is used both for the memory queue and for exectution.
This will be changed according to WL#3337 probably in the next commit.
sql/event_data_objects.cc:
Strip unneeded stuff from class Event_timed
Event_timed is still used for the queue and execution.
That will be changed in the next commit.
sql/event_data_objects.h:
Strip unneeded stuff from class Event_timed
Event_timed is still used for the queue and execution.
That will be changed in the next commit.
sql/event_db_repository.cc:
Cosmetics.
Add a new method load_named_event_job, to be made complete in the
next commit. It will load from disk an instance of Event_job_data to
be used during execution.
sql/event_db_repository.h:
find_event does not need MEM_ROOT anymore
because the memory is allocated on Event's own root.
sql/event_queue.cc:
Remove dead code.
Move dumping of the queue to separate method.
Make critical sections in create_event & update_event
as small as possible - load the new event outside of the section
and free the object also outside of it.
sql/event_queue.h:
init -> init_queue -> easier for ctags
deinit -> deinit_queue -> easier for ctags
sql/event_scheduler.cc:
empty this file
sql/event_scheduler.h:
empty this file
sql/event_scheduler_ng.cc:
add back DBUG_RETURN(0) in thread handlers.
We don't stop running events when stopping the scheduler. Therefore
remove this method now. If it is needed later it can be added back.
sql/event_scheduler_ng.h:
Remove stop_all_running_threads()
init -> init_scheduler
deinit -> deinit_scheduler
easier for ctags
sql/events.cc:
Cosmetics
sql/events.h:
Cosmetics
sql/set_var.cc:
Remove references to dead code
sql/sql_parse.cc:
Reorganize a bit.
Diffstat (limited to 'sql/event_data_objects.h')
-rw-r--r-- | sql/event_data_objects.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/sql/event_data_objects.h b/sql/event_data_objects.h index 5ae5c7e81ab..a5aaf0e66fa 100644 --- a/sql/event_data_objects.h +++ b/sql/event_data_objects.h @@ -63,12 +63,6 @@ class Event_timed { Event_timed(const Event_timed &); /* Prevent use of these */ void operator=(Event_timed &); - my_bool in_spawned_thread; - ulong locked_by_thread_id; - my_bool running; - ulong thread_id; - pthread_mutex_t LOCK_running; - pthread_cond_t COND_finished; bool status_changed; bool last_executed_changed; @@ -118,7 +112,6 @@ public: ulong sql_mode; bool dropped; - bool free_sphead_on_delete; uint flags;//all kind of purposes static void *operator new(size_t size) @@ -146,9 +139,6 @@ public: void init(); - void - deinit_mutexes(); - int load_from_row(TABLE *table); @@ -172,24 +162,9 @@ public: int compile(THD *thd, MEM_ROOT *mem_root); - - bool - is_running(); - - int - spawn_now(void * (*thread_func)(void*), void *arg); - - bool - spawn_thread_finish(THD *thd); void free_sp(); - - int - kill_thread(THD *thd); - - void - set_thread_id(ulong tid) { thread_id= tid; } }; |