summaryrefslogtreecommitdiff
path: root/mysys/thr_lock.c
diff options
context:
space:
mode:
authorunknown <pappa@c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se>2005-07-20 21:58:33 -0400
committerunknown <pappa@c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se>2005-07-20 21:58:33 -0400
commita3fe765249cd6b23dcd59a9bda3f310606877dc8 (patch)
tree67806b9ee022b7209440238f0cf7228d9e910a58 /mysys/thr_lock.c
parentbf4dfde9fc729894eb745b58ced160133ecde510 (diff)
parentaf1dfb613b7ce6343f461d6f4c3def6af9354814 (diff)
downloadmariadb-git-a3fe765249cd6b23dcd59a9bda3f310606877dc8.tar.gz
Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.0
into c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-4.1 include/thr_lock.h: Auto merged mysys/thr_lock.c: Auto merged sql/lock.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_table.cc: Manual merge after 4.0 fix
Diffstat (limited to 'mysys/thr_lock.c')
-rw-r--r--mysys/thr_lock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index d47ca8de183..fbdf344e29a 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -966,9 +966,10 @@ void thr_abort_locks(THR_LOCK *lock)
This is used to abort all locks for a specific thread
*/
-void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
+bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
{
THR_LOCK_DATA *data;
+ bool found= FALSE;
DBUG_ENTER("thr_abort_locks_for_thread");
pthread_mutex_lock(&lock->mutex);
@@ -978,6 +979,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
{
DBUG_PRINT("info",("Aborting read-wait lock"));
data->type= TL_UNLOCK; /* Mark killed */
+ found= TRUE;
pthread_cond_signal(data->cond);
data->cond= 0; /* Removed from list */
@@ -993,6 +995,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
{
DBUG_PRINT("info",("Aborting write-wait lock"));
data->type= TL_UNLOCK;
+ found= TRUE;
pthread_cond_signal(data->cond);
data->cond= 0;
@@ -1003,7 +1006,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
}
}
pthread_mutex_unlock(&lock->mutex);
- DBUG_VOID_RETURN;
+ DBUG_RETURN(found);
}