summaryrefslogtreecommitdiff
path: root/mysys/thr_lock.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-01-11 15:36:41 +0200
committerMichael Widenius <monty@askmonty.org>2011-01-11 15:36:41 +0200
commit050c004f5e6f152f5c4cdadda8a15e01d2f07a9a (patch)
treef5828daced42ff651d5f822af17844154fb9ffd1 /mysys/thr_lock.c
parente63b5546c597f65696868eaf69159107bc4a8e44 (diff)
parent2eaa76b84426b19f8574876ad1fa85ae6cfe3196 (diff)
downloadmariadb-git-050c004f5e6f152f5c4cdadda8a15e01d2f07a9a.tar.gz
Merge with 5.1
Fixes to get Aria handler tests to work. Fixes LP#697597 "HANDLER + Aria asserts in maria-5.3-handler"
Diffstat (limited to 'mysys/thr_lock.c')
-rw-r--r--mysys/thr_lock.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index 9d1b6f04b7a..32b258c0536 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -158,15 +158,13 @@ static int check_lock(struct st_lock_list *list, const char* lock_type,
{
THR_LOCK_DATA *data,**prev;
uint count=0;
- THR_LOCK_OWNER *UNINIT_VAR(first_owner);
prev= &list->data;
if (list->data)
{
- enum thr_lock_type last_lock_type=list->data->type;
+ enum thr_lock_type last_lock_type= list->data->type;
+ THR_LOCK_OWNER *first_owner= list->data->owner;
- if (same_owner && list->data)
- first_owner= list->data->owner;
for (data=list->data; data && count++ < MAX_LOCKS ; data=data->next)
{
if (data->type != last_lock_type)
@@ -184,8 +182,8 @@ 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: %s\n",
- lock_type,where);
+ "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);
return 1;
}
if (no_cond && data->cond)