summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-07 12:27:42 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-07 12:27:42 +0200
commit4c0f43f45aa2c1c9e469f01274bddc6b980a2535 (patch)
treef4ca41e3df6c82e103a1aa4d3e120a30a3c4989f /storage
parent84645366c459b01771223a6d1a20bf7ac38adf48 (diff)
parent0a0eed80164dac0d3bfb7dcc57eb416cfba89386 (diff)
downloadmariadb-git-4c0f43f45aa2c1c9e469f01274bddc6b980a2535.tar.gz
Merge 10.0 into 10.1
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/row/row0mysql.cc9
-rw-r--r--storage/xtradb/row/row0mysql.cc9
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);