Below is the list of changes that have just been committed into a local
5.1 repository of patg. When patg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1968 05/11/21 15:31:12 patg@stripped +1 -0
Merge pgalbraith@stripped:/home/bk/mysql-5.1-new
into krsna.patg.net:/home/patg/mysql-build/mysql-5.1-new
sql/lock.cc
1.79 05/11/21 15:30:58 patg@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: patg
# Host: krsna.patg.net
# Root: /home/patg/mysql-build/mysql-5.1-new/RESYNC
--- 1.78/sql/lock.cc 2005-11-18 17:01:29 -08:00
+++ 1.79/sql/lock.cc 2005-11-21 15:30:58 -08:00
@@ -821,10 +821,13 @@
access to them is protected with a mutex LOCK_global_read_lock
- (XXX: one should never take LOCK_open if LOCK_global_read_lock is taken,
- otherwise a deadlock may occur - see mysql_rm_table. Other mutexes could
- be a problem too - grep the code for global_read_lock if you want to use
- any other mutex here)
+ (XXX: one should never take LOCK_open if LOCK_global_read_lock is
+ taken, otherwise a deadlock may occur. Other mutexes could be a
+ problem too - grep the code for global_read_lock if you want to use
+ any other mutex here) Also one must not hold LOCK_open when calling
+ wait_if_global_read_lock(). When the thread with the global read lock
+ tries to close its tables, it needs to take LOCK_open in
+ close_thread_table().
How blocking of threads by global read lock is achieved: that's
advisory. Any piece of code which should be blocked by global read lock must
@@ -943,6 +946,13 @@
DBUG_ENTER("wait_if_global_read_lock");
LINT_INIT(old_message);
+ /*
+ Assert that we do not own LOCK_open. If we would own it, other
+ threads could not close their tables. This would make a pretty
+ deadlock.
+ */
+ safe_mutex_assert_not_owner(&LOCK_open);
+
(void) pthread_mutex_lock(&LOCK_global_read_lock);
if ((need_exit_cond= must_wait))
{
| Thread |
|---|
| • bk commit into 5.1 tree (patg:1.1968) | Patrick Galbraith | 22 Nov |