mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
row0mysql.c:
Backport from 4.0: Fix corruption of ON DELETE CASCADE in lock wait timeout innobase/row/row0mysql.c: Backport from 4.0: Fix corruption of ON DELETE CASCADE in lock wait timeout
This commit is contained in:
@ -1012,10 +1012,25 @@ run_again:
|
|||||||
|
|
||||||
err = trx->error_state;
|
err = trx->error_state;
|
||||||
|
|
||||||
|
/* Note that the cascade node is a subnode of another InnoDB
|
||||||
|
query graph node. We do a normal lock wait in this node, but
|
||||||
|
all errors are handled by the parent node. */
|
||||||
|
|
||||||
if (err == DB_LOCK_WAIT) {
|
if (err == DB_LOCK_WAIT) {
|
||||||
|
/* Handle lock wait here */
|
||||||
|
|
||||||
que_thr_stop_for_mysql(thr);
|
que_thr_stop_for_mysql(thr);
|
||||||
|
|
||||||
row_mysql_handle_errors(&err, trx, thr, NULL);
|
srv_suspend_mysql_thread(thr);
|
||||||
|
|
||||||
|
/* Note that a lock wait may also end in a lock wait timeout */
|
||||||
|
|
||||||
|
if (trx->error_state != DB_SUCCESS) {
|
||||||
|
|
||||||
|
return(trx->error_state);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Retry operation after a normal lock wait */
|
||||||
|
|
||||||
goto run_again;
|
goto run_again;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user