summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2002-11-07 16:39:48 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2002-11-07 16:39:48 +0200
commit28ebc842ee3a7423c0430ba0c60a5194dc78ec19 (patch)
treed800e4a48627e26bb491ab19f90fad3e7d801a12
parent2f775fca9a96bb992c0bf4736d11b2ab78237fe4 (diff)
parentf5e71883bef3d89cb05fa9ab6497dbaed66ad9b0 (diff)
downloadmariadb-git-28ebc842ee3a7423c0430ba0c60a5194dc78ec19.tar.gz
Merge sinisa@work.mysql.com:/home/bk/mysql
into sinisa.nasamreza.org:/mnt/work/mysql
-rw-r--r--innobase/row/row0mysql.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index 26878f8c97c..ebb3cbe8dc8 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -1000,8 +1000,8 @@ row_update_cascade_for_mysql(
or set null operation */
dict_table_t* table) /* in: table where we do the operation */
{
- ulint err;
- trx_t* trx;
+ ulint err;
+ trx_t* trx;
trx = thr_get_trx(thr);
run_again:
@@ -1012,11 +1012,26 @@ run_again:
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) {
- que_thr_stop_for_mysql(thr);
+ /* Handle lock wait here */
- row_mysql_handle_errors(&err, trx, thr, NULL);
+ que_thr_stop_for_mysql(thr);
+ 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;
}