MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
unknown 3c39b0d831 Fix for bug#22740 Events: Decouple Event_queue from Event_db_repository
This patch implements the idea of the bug report by making Event_queue
unaware of Event_db_repository by making a higher level class - Events,
which is aware of most of all classes, responsible for passing all data
needed for adding/updating/deleting an event to/from the queue.

Introduces few new classes :
 - Event_worker_thread
 - Event_queue_element_for_exec


sql/event_data_objects.cc:
  Introduced a new class Event_queue_element_for_exec
  According to Konstantin it should be named Event_name and hold
  only two LEX_STRINGs but `dropped` is not saved on disk and will
  require additional logic in Event_worker_thread class, after loading
  to compute whether the event should be dropped or not. It's easier
  just to pass this flag around.
  
  Removed Event_queue_element::drop(). This method was a source of a
  race condition. At the place where the event should be dropped we
  call Events::drop_event() which is the only code-flow for dropping.
  In addition, because ::drop_event() holds Events::LOCK_metadata there is
  no source of race conditions. Before this patch dropping from ::drop()
  wasn't under LOCK_metadata and races were possible.
  
  Because Events::open_event_table was removed as a method, provisionally
  events_event_db_repository was exported from events.cc till a solution is
  build where Event_queue_element does not access directly mysql.event.
sql/event_data_objects.h:
  New class Event_queue_element_for_exec added which is returned
  from Event_queue::get_top_if_time() and passed through Event_scheduler
  to Event_worker_thread. There by using the (db)name Event_job_data is
  instanciated and executed.
  
  Dropped Event_queue_element::drop()
  
  thd was moved out of Event_job_data as it is now part of
  Event_queue_element_for_exec
sql/event_queue.cc:
  Removed dependency of Event_queue on Event_db_repository.
  The instantiation of Event_job_data was moved to class Event_worker_thread
  In place is a return of an object of Event_queue_element_for_exec is used
  later for instantiating Event_job_data.
  
  The `dropped` flag of Event_queue_element is passed over
  Event_queue_element_for_exec to the code in Event_worker_thread.
sql/event_queue.h:
  Removed dependency of Event_queue on Event_db_repository
  Removed dependency on Event_scheduler
sql/event_scheduler.cc:
  Added class Event_worker_thread, which is used during
  the execution of an event. It has a static init() method
  to get a pointer to Event_db_repository to be used for
  instantiation of Event_job_data object. This object it then
  executed.
sql/event_scheduler.h:
  Added class Event_worker_thread, which is used during
  the execution of an event.
sql/events.cc:
  Removed Events::open_event_table() because it was a product of
  a bad architecture.
sql/events.h:
  Removed friend definition, unneeded.
  
  Fixed Events::drop_event() to have the previous signature without
  bool only_from_disk
sql/sql_parse.cc:
  Fix call
2007-01-29 20:46:29 +03:00
BitKeeper Merge siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/51 2007-01-18 08:30:35 -07:00
BUILD SETUP.sh: 2007-01-25 13:12:02 +01:00
client Merge polly.local:/tmp/maint/bug23814/my51-bug23814 2007-01-19 14:29:18 +03:00
cmd-line-utils Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-23 20:20:40 +01:00
config/ac-macros Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl 2007-01-12 12:31:44 +01:00
dbug Many files: 2006-12-31 02:29:11 +01:00
Docs Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-31 01:32:21 +01:00
extra Merge bk-internal.mysql.com:/home/bk/mysql-5.1 2007-01-07 09:31:49 -05:00
include Merge mysql.com:/home/svoj/devel/bk/mysql-5.1 2007-01-25 01:44:30 +04:00
libmysql Merge siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/maint/50 2007-01-18 08:41:52 -07:00
libmysql_r my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
libmysqld Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl 2007-01-17 19:32:14 +01:00
man my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mysql-test Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel 2007-01-25 14:58:45 +03:00
mysys Merge mysql.com:/home/svoj/devel/bk/mysql-5.1 2007-01-25 01:44:30 +04:00
netware Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-23 20:20:40 +01:00
plugin Many files: 2006-12-31 02:29:11 +01:00
pstack my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
regex Many files: 2006-12-31 02:29:11 +01:00
scripts Merge mysql.com:/home/svoj/devel/bk/mysql-5.1 2007-01-25 01:44:30 +04:00
server-tools Merge siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/51 2007-01-18 08:30:35 -07:00
sql Fix for bug#22740 Events: Decouple Event_queue from Event_db_repository 2007-01-29 20:46:29 +03:00
sql-bench Merge bk-internal.mysql.com:/home/bk/mysql-5.1 2007-01-22 19:18:22 +02:00
sql-common Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-31 01:32:21 +01:00
storage Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1 2007-01-25 18:14:51 +07:00
strings Merge bk-internal.mysql.com:/home/bk/mysql-5.1 2007-01-07 09:31:49 -05:00
support-files Merge trift2.:/MySQL/M50/tmp1-5.0 2007-01-11 20:20:43 +01:00
tests Merge pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint 2007-01-19 11:12:24 +01:00
unittest Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl 2007-01-12 12:31:44 +01:00
vio Merge bk-internal.mysql.com:/home/bk/mysql-5.1 2007-01-07 09:31:49 -05:00
win Many files: 2006-12-31 02:29:11 +01:00
zlib Many files: 2006-12-31 02:29:11 +01:00
.bzrignore Merge 5.1-main -> 5.1-runtime, added ignore entry for missing symbolic link 2007-01-02 17:49:05 -07:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
CMakeLists.txt Many files: 2006-12-31 02:29:11 +01:00
configure.in Raise version number after cloning 5.1.15-beta 2007-01-25 18:19:49 +01:00
COPYING - manual.texi will be replaced with a manual written in DocBook/XML. This ChangeSet removes all 2005-04-13 11:51:38 +02:00
Makefile.am Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime 2007-01-24 14:43:09 -07:00
README make_binary_distribution.sh: 2006-11-07 22:26:37 +01:00

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file and
  the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file.


For further information about MySQL or additional documentation, see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installing and Upgrading chapter.
- For the new features/bugfix history, see the Change History appendix.
- For the currently known bugs/misfeatures (known errors) see the Problems
  and Common Errors appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.