diff options
author | Jimmy Yang <jimmy.yang@oracle.com> | 2010-10-06 07:58:12 -0700 |
---|---|---|
committer | Jimmy Yang <jimmy.yang@oracle.com> | 2010-10-06 07:58:12 -0700 |
commit | 8e035295025cfb1b56cde182fe77cc8aeeaa93e9 (patch) | |
tree | f4f6bb0dfe473690d1b39a6504de4842100a91fa /storage | |
parent | c0923d396aef46799883390e9dcf7bbf173e4a03 (diff) | |
parent | 34c61d04482dcf558102db89f9896d894c617ae3 (diff) | |
download | mariadb-git-8e035295025cfb1b56cde182fe77cc8aeeaa93e9.tar.gz |
Merge from mysql-5.1-security to mysql-5.5-security
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/row/row0mysql.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index e0f85b3ebb4..3e155fd14e6 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -1652,6 +1652,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) { @@ -1663,6 +1666,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 |