mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user