mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
Fix Bug #57255 Cascade Delete results in "Got error -1 from storage engine".
rb://477 approved by Marko
This commit is contained in:
parent
6f9839d965
commit
cf2c8701b4
7 changed files with 114 additions and 0 deletions
|
|
@ -1613,6 +1613,9 @@ row_update_cascade_for_mysql(
|
|||
|
||||
trx = thr_get_trx(thr);
|
||||
|
||||
/* Increment fk_cascade_depth to record the recursive call depth on
|
||||
a single update/delete that affects multiple tables chained
|
||||
together with foreign key relations. */
|
||||
thr->fk_cascade_depth++;
|
||||
|
||||
if (thr->fk_cascade_depth > FK_MAX_CASCADE_DEL) {
|
||||
|
|
@ -1624,6 +1627,12 @@ run_again:
|
|||
|
||||
row_upd_step(thr);
|
||||
|
||||
/* The recursive call for cascading update/delete happens
|
||||
in above row_upd_step(), reset the counter once we come
|
||||
out of the recursive call, so it does not accumulate for
|
||||
different row deletes */
|
||||
thr->fk_cascade_depth = 0;
|
||||
|
||||
err = trx->error_state;
|
||||
|
||||
/* Note that the cascade node is a subnode of another InnoDB
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue