summaryrefslogtreecommitdiff
path: root/mysys/thr_lock.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-03-26 13:29:45 +0300
committerMichael Widenius <monty@askmonty.org>2012-03-26 13:29:45 +0300
commit9ef537ac61d222f18af78c6cda9100f924c3ca2f (patch)
treefe2db5b57bc1febc0779957e41f6d4c87455d908 /mysys/thr_lock.c
parent6fcd19454a090714680743e989f92ac3826da03c (diff)
downloadmariadb-git-9ef537ac61d222f18af78c6cda9100f924c3ca2f.tar.gz
Fixed lp:963603 "Assertion `lock_type != TL_UNLOCK && (lock_type == TL_IGNORE || file->lock.type == TL_UNLOCK)' failed in ha_maria::store_lock with DML, triggers, views"
mysys/thr_lock.c: Ensure that all locks are marked as TL_UNLOCK in case of error (Safety fix) sql/lock.cc: Ensure that all locks are marked as TL_UNLOCK in case of error (This is the real fix for lp:963603)
Diffstat (limited to 'mysys/thr_lock.c')
-rw-r--r--mysys/thr_lock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index 32b38105d1f..b1722e0bfdf 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -1110,6 +1110,9 @@ thr_multi_lock(THR_LOCK_DATA **data, uint count, THR_LOCK_OWNER *owner)
if (result != THR_LOCK_SUCCESS)
{ /* Aborted */
thr_multi_unlock(data,(uint) (pos-data), 0);
+ /* Mark all requested locks as TL_UNLOCK (to simplify lock checking) */
+ for ( ; pos < end ; pos++)
+ (*pos)->type= TL_UNLOCK;
DBUG_RETURN(result);
}
#ifdef MAIN