diff options
author | Michael Widenius <monty@askmonty.org> | 2010-12-13 15:51:47 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-12-13 15:51:47 +0200 |
commit | 09d2e7f68029071dc98bc827a7215d00f2b9a859 (patch) | |
tree | 66ace303cfc1a254c981ddea815ec6b8e1915d79 /mysys | |
parent | ffb0cd6146662705491e1461a7727c9627f9bd15 (diff) | |
parent | 0b20943e9d7e22332ccc14b30b49a78a780cc23d (diff) | |
download | mariadb-git-09d2e7f68029071dc98bc827a7215d00f2b9a859.tar.gz |
merge with 5.1
(Includes patch for overrun detected by valgrind thanks to previous my_alloca() -> my_malloc() patch)
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/thr_lock.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index 341b2f0058e..68a3caf6da7 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) |