diff options
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/row/row0mysql.cc | 9 | ||||
-rw-r--r-- | storage/xtradb/row/row0mysql.cc | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index a8195b604f2..5d0d2d3ea2e 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -624,8 +624,7 @@ handle_new_error: switch (err) { case DB_LOCK_WAIT_TIMEOUT: if (row_rollback_on_timeout) { - trx_rollback_to_savepoint(trx, NULL); - break; + goto rollback; } /* fall through */ case DB_DUPLICATE_KEY: @@ -644,6 +643,7 @@ handle_new_error: case DB_DICT_CHANGED: case DB_TABLE_NOT_FOUND: case DB_DECRYPTION_FAILED: + rollback_to_savept: if (savept) { /* Roll back the latest, possibly incomplete insertion or update */ @@ -667,6 +667,7 @@ handle_new_error: case DB_DEADLOCK: case DB_LOCK_TABLE_FULL: + rollback: /* Roll back the whole transaction; this resolution was added to version 3.23.43 */ @@ -696,14 +697,14 @@ handle_new_error: "InnoDB: you dump the tables, look at\n" "InnoDB: " REFMAN "forcing-innodb-recovery.html" " for help.\n", stderr); - break; + goto rollback_to_savept; case DB_FOREIGN_EXCEED_MAX_CASCADE: fprintf(stderr, "InnoDB: Cannot delete/update rows with" " cascading foreign key constraints that exceed max" " depth of %lu\n" "Please drop excessive foreign constraints" " and try again\n", (ulong) DICT_FK_MAX_RECURSIVE_LOAD); - break; + goto rollback_to_savept; default: fprintf(stderr, "InnoDB: unknown error code %lu\n", (ulong) err); diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc index 498a35a86ce..47075c6cbc8 100644 --- a/storage/xtradb/row/row0mysql.cc +++ b/storage/xtradb/row/row0mysql.cc @@ -615,8 +615,7 @@ handle_new_error: switch (err) { case DB_LOCK_WAIT_TIMEOUT: if (row_rollback_on_timeout) { - trx_rollback_to_savepoint(trx, NULL); - break; + goto rollback; } /* fall through */ case DB_DUPLICATE_KEY: @@ -635,6 +634,7 @@ handle_new_error: case DB_DICT_CHANGED: case DB_TABLE_NOT_FOUND: case DB_DECRYPTION_FAILED: + rollback_to_savept: if (savept) { /* Roll back the latest, possibly incomplete insertion or update */ @@ -658,6 +658,7 @@ handle_new_error: case DB_DEADLOCK: case DB_LOCK_TABLE_FULL: + rollback: /* Roll back the whole transaction; this resolution was added to version 3.23.43 */ @@ -687,14 +688,14 @@ handle_new_error: "InnoDB: you dump the tables, look at\n" "InnoDB: " REFMAN "forcing-innodb-recovery.html" " for help.\n", stderr); - break; + goto rollback_to_savept; case DB_FOREIGN_EXCEED_MAX_CASCADE: fprintf(stderr, "InnoDB: Cannot delete/update rows with" " cascading foreign key constraints that exceed max" " depth of %lu\n" "Please drop excessive foreign constraints" " and try again\n", (ulong) DICT_FK_MAX_RECURSIVE_LOAD); - break; + goto rollback_to_savept; default: fprintf(stderr, "InnoDB: unknown error code %lu\n", (ulong) err); |