mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Bug#13586591 RQG GRAMMAR CONF/ENGINES/ENGINE_STRESS.YY
CRASHES INNODB | TRX_STATE_NOT_STARTED The problem was that if DELETE with subselect caused a deadlock inside InnoDB, this deadlock was not properly handled by the SQL layer. This meant that the SQL layer would try to unlock the row after InnoDB had rolled back the transaction. This caused an assertion inside InnoDB. This patch fixes the problem by checking for errors reported by SQL_SELECT::skip_record() and not calling unlock_row() if any errors have been reported.
This commit is contained in:
parent
46ca66b9f8
commit
6aab1cecec
1 changed files with 7 additions and 1 deletions
|
@ -341,8 +341,14 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
|||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
/*
|
||||
Don't try unlocking the row if skip_record reported an error since in
|
||||
this case the transaction might have been rolled back already.
|
||||
*/
|
||||
else if (!thd->is_error())
|
||||
table->file->unlock_row(); // Row failed selection, release lock on it
|
||||
else
|
||||
break;
|
||||
}
|
||||
killed_status= thd->killed;
|
||||
if (killed_status != THD::NOT_KILLED || thd->is_error())
|
||||
|
|
Loading…
Reference in a new issue