summaryrefslogtreecommitdiff
path: root/mysys/thr_lock.c
diff options
context:
space:
mode:
authorunknown <pappa@c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se>2005-07-21 01:29:57 -0400
committerunknown <pappa@c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se>2005-07-21 01:29:57 -0400
commit0b732c47973622384b97caccb9703b9bd5a4a93e (patch)
treef28d036bdc60c31c38b1d066b2d9e02fa4e980e6 /mysys/thr_lock.c
parent1ef3c69685de83a28ce44588f70df808c16df1ce (diff)
parent31ebc6ef71afaf4605ab5d00ddaf8d548683212d (diff)
downloadmariadb-git-0b732c47973622384b97caccb9703b9bd5a4a93e.tar.gz
Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.0 include/my_sys.h: Auto merged include/thr_lock.h: Auto merged sql/handler.cc: Auto merged sql-common/client.c: Auto merged client/mysqldump.c: Manual merge include/mysql.h: Manual merge libmysql/libmysql.c: Manual merge myisam/rt_split.c: Manual merge mysys/thr_lock.c: Manual merge sql/lock.cc: Manual merge sql/mysql_priv.h: Manual merge sql/sql_base.cc: Manual merge sql/sql_table.cc: Manual merge tests/mysql_client_test.c: Manual merge
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 b12f8234c26..f3179fee994 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -1048,9 +1048,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);
@@ -1061,6 +1062,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 */
/* It's safe to signal the cond first: we're still holding the mutex. */
+ found= TRUE;
pthread_cond_signal(data->cond);
data->cond= 0; /* Removed from list */
@@ -1076,6 +1078,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;
@@ -1086,7 +1089,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
}
}
pthread_mutex_unlock(&lock->mutex);
- DBUG_VOID_RETURN;
+ DBUG_RETURN(found);
}