Commit graph

42444 commits

Author SHA1 Message Date
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
unknown
bb3e15e8ba Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1
into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1-bug23527
2007-01-25 22:20:07 +03:00
unknown
8b2d013364 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge
2007-01-25 21:55:44 +03:00
unknown
61e67472f1 Raise version number after cloning 5.1.15-beta 2007-01-25 18:19:49 +01:00
unknown
e76fde2fae Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0-bug23527
into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1-bug23527


sql/sql_cache.cc:
  Auto merged
2007-01-25 20:04:57 +03:00
unknown
ef0132685d BUG#23527: set global query_cache_size can crash the server under
high load

MySQL server could crash if two or more threads would initiate query
cache resize at the moments very close in time.

The problem was introduced with the fix of bug 21051 in 5.0 and 5.1:
simultaneous query cache resizes would wait for the first one in
progress, but then each thread would try to finish the operation,
accessing the data that was already reset (attempt to dereference
'bins' pointer, which may be NULL already).

The solution is to check after synchronization if another thread has
done the reset already (test 'query_cache_size > 0' again).

No test case is provided because the bug is a subject to a race.


sql/sql_cache.cc:
  We release 'structure_guard_mutex' in flush_cache(), so after the
  call we check if another thread had reset the cache before us.
2007-01-25 20:00:12 +03:00
unknown
9cbdb2edab SETUP.sh:
Don't use -Wshadow by default yet


BUILD/SETUP.sh:
  Don't use -Wshadow by default yet
2007-01-25 13:12:02 +01:00
unknown
7f2a0175b6 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge


mysql-test/t/sp-error.test:
  Auto merged
sql/sql_table.cc:
  Auto merged
2007-01-25 14:58:45 +03:00
unknown
25f3230037 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1-new-ndb
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-marvel
2007-01-25 12:38:35 +01:00
unknown
a0a847fd45 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-marvel


mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/ndb_basic.test:
  Auto merged
2007-01-25 12:28:00 +01:00
unknown
d134dd4501 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
2007-01-25 18:14:51 +07:00
unknown
430cbe1d14 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge
2007-01-25 12:40:11 +03:00
unknown
d8eb51aec6 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge


sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
2007-01-25 11:26:07 +03:00
unknown
c20ef43f57 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into  poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
2007-01-25 11:21:04 +07:00
unknown
216b9face2 ndb:
- added extra cluster connect inicator bit for better handeling of delacation of event operations on cluster disconnect
- added extra assert to try to track down valgrind issue
2007-01-25 11:17:51 +07:00
unknown
247bd923c2 Merge mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.1-engines


mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/myisam.result:
  Use local.
mysql-test/t/myisam.test:
  Use local.
2007-01-25 01:51:13 +04:00
unknown
1cf8117863 Merge mysql.com:/home/svoj/devel/bk/mysql-5.1
into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.1-engines


mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
sql/lock.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/table.cc:
  Auto merged
storage/federated/ha_federated.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_packrec.c:
  Auto merged
mysql-test/r/myisam.result:
  Manually merged.
mysql-test/t/myisam.test:
  Manually merged.
2007-01-25 01:44:30 +04:00
unknown
53491b1800 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-21029


Makefile.am:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-01-24 14:43:09 -07:00
unknown
39cc6d117b Bug#21029 (Dependencies between sql_yacc.cc and dependent headers not detected)
The build scripts in general, using automake, autoconf, etc, contain several
special commands and work around all related to the way the bison code in the
parser is built, for sql/sql_yacc.yy. These work arounds, accumulated over
time during development, ultimately cause the build scripts to be unstable
and cause build defects by not enforcing dependencies.

This fix simplifies the build process and aligns it with the automake tooling,
which provides native support for bison and *.yy files.

In particular, the following problem have been fixed:
- dependencies with sql_yacc.cc were not honored (Bug 21029), leading to
  corrupted builds,
- the work around introduced by Bug 24557, to cleanup the generated files
  sql_yacc.h and sql_yacc.cc, has been removed,
- the generated makefile, in a source distribution, used to destroy the files
  sql_yacc.h and sql_yacc.cc on a 'make clean' target. This has been fixed:
  these files are now removed by make maintainer-clean.
- The root cause of the problem found with gcc 4.1 (see Bug 24619) has been
  clearly documented, and the "sed" hack has been replaced by a cleaner
  work around, when building the code with bison 1.875.
- Removed the file sql/sql_yacc.yy.bak, added by WL 3031 by accident.
- Removed the unnecessary AM_YFLAG= --debug introduced by WL 3432, since
  the compiling option DBUG_OFF takes precedence when setting YYDEBUG.


BitKeeper/deleted/.del-sql_yacc.yy.bak:
  Rename: sql/sql_yacc.yy.bak -> BitKeeper/deleted/.del-sql_yacc.yy.bak
Makefile.am:
  General cleanup of the build process for sql_yacc.yy
sql/Makefile.am:
  General cleanup of the build process for sql_yacc.yy
sql/sql_yacc.yy:
  General cleanup of the build process for sql_yacc.yy
2007-01-24 14:40:39 -07:00
unknown
2ed7eaf564 Merge mysql.com:/home/svoj/devel/bk/mysql-5.0
into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines


mysql-test/t/myisam.test:
  Auto merged
2007-01-25 01:31:58 +04:00
unknown
c26ffedb86 Merge mysql.com:/home/svoj/devel/bk/mysql-5.0
into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines


mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/myisam.result:
  Manually merged.
mysql-test/t/myisam.test:
  Manually merged.
2007-01-25 01:26:57 +04:00
unknown
5c0216c593 Merge mockturtle.local:/home/dlenev/src/mysql-5.0-merge
into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge


mysql-test/t/ps.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
mysql-test/t/disabled.def:
  Manual merge.
2007-01-24 22:15:14 +03:00
unknown
259a465822 Disabling back im_daemon_life_cycle.test, which was temporarily enabled in
the team tree for additional investigation.
2007-01-24 22:11:27 +03:00
unknown
7b109de61a Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mockturtle.local:/home/dlenev/src/mysql-5.0-merge


mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
2007-01-24 19:33:06 +03:00
unknown
491ef6af00 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge


mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/sql_view.cc:
  Auto merged
2007-01-24 19:26:06 +03:00
unknown
6bb5fd6b28 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  chilla.local:/home/mydev/mysql-5.0-bug24607


mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
2007-01-24 15:52:19 +01:00
unknown
e8ca911f5d Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  chilla.local:/home/mydev/mysql-5.1-bug24607


mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
2007-01-24 15:47:04 +01:00
unknown
89f02b13e3 After merge fix 2007-01-24 15:45:41 +01:00
unknown
389388f16b Merge chilla.local:/home/mydev/mysql-5.0-bug24607
into  chilla.local:/home/mydev/mysql-5.1-bug24607


mysql-test/t/myisam.test:
  Auto merged
mysql-test/r/myisam.result:
  Manual merged
2007-01-24 13:32:36 +01:00
unknown
ccb002dbc2 Bug#24607 - MyISAM pointer size determined incorrectly
After merge fix
2007-01-24 13:29:46 +01:00
unknown
4f73c75fba Merge chilla.local:/home/mydev/mysql-4.1-bug24607
into  chilla.local:/home/mydev/mysql-5.0-bug24607


mysql-test/r/myisam.result:
  Manual merged
mysql-test/t/myisam.test:
  Manual merged
2007-01-24 13:26:06 +01:00
unknown
112ef50f28 Bug#24607 - MyISAM pointer size determined incorrectly
Fixed test. On 32-bit machines which compile without
-DBIG_TABLES, MAX_ROWS is truncated to a 32-bit value.
Using a value below 4G is portable.


mysql-test/r/myisam.result:
  Bug#24607 - MyISAM pointer size determined incorrectly
  Fixed test results.
2007-01-24 13:17:01 +01:00
unknown
bb5dccf260 Merge kahlann.erinye.com:/home/df/mysql/build/mysql-5.0
into  kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build-work


sql/ha_ndbcluster.cc:
  Auto merged
2007-01-24 09:24:52 +01:00
unknown
e57ef96a08 Merge kahlann.erinye.com:/home/df/mysql/build/mysql-5.1
into  kahlann.erinye.com:/home/df/mysql/build/mysql-5.1-build-work
2007-01-24 09:24:29 +01:00
unknown
8b405d4fad Merge mysql.com:/home/svoj/devel/mysql/BUG24401/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG24401/mysql-5.1-engines


mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
2007-01-24 11:56:18 +04:00
unknown
6216e794c3 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG24401/mysql-5.1-engines
2007-01-24 11:54:38 +04:00
unknown
5e0fd916f1 After merge fix. 2007-01-24 11:53:09 +04:00
unknown
07b6b2f876 Fixed test case after merging fix for bug#24491 "using alias from source
table in insert ... on duplicate key" in 5.1 tree.


mysql-test/t/sp-error.test:
  After merge fix.
2007-01-24 10:46:25 +03:00
unknown
a45938bf5a Merge mockturtle.local:/home/dlenev/src/mysql-5.0-bg24491
into  mockturtle.local:/home/dlenev/src/mysql-5.1-bg24491


mysql-test/t/sp-error.test:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/r/ps.result:
  SCCS merged
mysql-test/r/sp-error.result:
  SCCS merged
mysql-test/t/disabled.def:
  SCCS merged
mysql-test/t/ps.test:
  SCCS merged
2007-01-24 10:42:57 +03:00
unknown
4c51028e46 Merge mysql.com:/home/svoj/devel/mysql/BUG24401/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG24401/mysql-5.0-engines


mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
2007-01-24 11:41:13 +04:00
unknown
89e558c9c7 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG24401/mysql-5.0-engines
2007-01-24 11:40:45 +04:00
unknown
7513ef2651 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG24401/mysql-4.1-engines
2007-01-24 11:38:23 +04:00
unknown
3f064efb0e Merge bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  willster.(none):/home/stewart/Documents/MySQL/5.0/ndb-work
2007-01-24 16:24:21 +11:00
unknown
1b71102f4b Merge willster.(none):/home/stewart/Documents/MySQL/5.0/ndb-work
into  willster.(none):/home/stewart/Documents/MySQL/5.1/ndb-work


storage/ndb/src/common/util/SocketClient.cpp:
  Auto merged
2007-01-24 16:16:16 +11:00
unknown
71f606804c fix hpux build problem and some ndb connect errors being missed
ndb/src/common/util/SocketClient.cpp:
  fix two problems recently introduced:
  - HPUX build problem
  - some connect errors not being detected properly
2007-01-24 16:12:39 +11:00
unknown
02a9f2f719 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  poseidon.mysql.com:/home/tomas/mysql-5.0-ndb


sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
2007-01-24 09:13:47 +07:00
unknown
1f4d8ba085 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug24607


mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
2007-01-23 22:27:03 +01:00
unknown
ffb51e1592 Merge bk-internal:/home/bk/mysql-5.1
into  production.mysql.com:/usersnfs/mjorgensen/bktrees/mysql-5.1-build


sql/ha_ndbcluster.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-01-23 20:38:00 +01:00
unknown
4bec8b037f Merge bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  chilla.local:/home/mydev/mysql-5.0-bug24607


mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
2007-01-23 20:19:19 +01:00
unknown
dd5523d997 Merge xiphis.org:/home/antony/work2/p1-bug25396.4
into  xiphis.org:/home/antony/work2/p1-bug25396.5


sql/ha_ndbcluster.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-01-23 08:34:50 -08:00