summaryrefslogtreecommitdiff
path: root/mysys/thr_lock.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-01-26 15:17:46 +0200
committerMichael Widenius <monty@askmonty.org>2011-01-26 15:17:46 +0200
commit69fe020f01a7eefa9f737291f0da2be56f42a6a0 (patch)
tree3a66096753a6342dd78d1eef711b722db03de017 /mysys/thr_lock.c
parent26565ae1d6bc02fac641abf2747da23bd1013976 (diff)
downloadmariadb-git-69fe020f01a7eefa9f737291f0da2be56f42a6a0.tar.gz
Fixed bugs found by buildbot:
- Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables. - Fixed compiler warnings - Added a name for each thr_lock to get better error messages (This is needed to find out why 'archive.test' sometimes fails) BUILD/SETUP.sh: Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables. BUILD/build_mccge.sh: Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables. client/mysqltest.cc: Fixed bug in remove_files_wildcards (the orignal code never removed anything) extra/libevent/devpoll.c: Fixed compiler warning include/thr_lock.h: Added a name for each thr_lock to get better error messages. mysql-test/suite/maria/t/maria3.test: Speed up test. mysys/thr_lock.c: Added a name for each thr_lock to get better error messages. Added a second 'check_locks' to find if something goes wrong in 'wake_up_waiters'. sql/lock.cc: Added a name for each thr_lock to get better error messages. storage/xtradb/fil/fil0fil.c: Fixed compiler warning
Diffstat (limited to 'mysys/thr_lock.c')
-rw-r--r--mysys/thr_lock.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index 68a3caf6da7..f7908ab57bc 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -182,8 +182,10 @@ static int check_lock(struct st_lock_list *list, const char* lock_type,
last_lock_type != TL_WRITE_CONCURRENT_INSERT)
{
fprintf(stderr,
- "Warning: Found locks from different threads in %s at '%s'. org_lock_type: %d last_lock_type: %d new_lock_type: %d\n",
- lock_type, where, list->data->type, last_lock_type, data->type);
+ "Warning: Found locks from different threads for lock '%s' in '%s' at '%s'. org_lock_type: %d last_lock_type: %d new_lock_type: %d\n",
+ data->lock->name ? data->lock->name : "",
+ lock_type, where, list->data->type, last_lock_type,
+ data->type);
return 1;
}
if (no_cond && data->cond)
@@ -405,6 +407,7 @@ void thr_lock_data_init(THR_LOCK *lock,THR_LOCK_DATA *data, void *param)
data->status_param=param;
data->cond=0;
data->priority= 0;
+ data->debug_print_param= 0;
}
@@ -879,6 +882,7 @@ void thr_unlock(THR_LOCK_DATA *data, uint unlock_flags)
data->type=TL_UNLOCK; /* Mark unlocked */
check_locks(lock,"after releasing lock",1);
wake_up_waiters(lock);
+ check_locks(lock,"end of thr_unlock",1);
pthread_mutex_unlock(&lock->mutex);
DBUG_VOID_RETURN;
}