Commit 9ef537ac authored by Michael Widenius's avatar Michael Widenius

Fixed lp:963603 "Assertion `lock_type != TL_UNLOCK && (lock_type == TL_IGNORE...

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)
parent 6fcd1945
......@@ -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
......
......@@ -312,7 +312,7 @@ int mysql_lock_tables(THD *thd, MYSQL_LOCK *sql_lock,
including) one that caused error. Lock type for other tables
preserved.
*/
reset_lock_data(sql_lock, 0);
reset_lock_data(sql_lock, 1);
if (rc > 1)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment