Commit 4c0f43f4 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.0 into 10.1

parents 84645366 0a0eed80
...@@ -624,8 +624,7 @@ row_mysql_handle_errors( ...@@ -624,8 +624,7 @@ row_mysql_handle_errors(
switch (err) { switch (err) {
case DB_LOCK_WAIT_TIMEOUT: case DB_LOCK_WAIT_TIMEOUT:
if (row_rollback_on_timeout) { if (row_rollback_on_timeout) {
trx_rollback_to_savepoint(trx, NULL); goto rollback;
break;
} }
/* fall through */ /* fall through */
case DB_DUPLICATE_KEY: case DB_DUPLICATE_KEY:
...@@ -644,6 +643,7 @@ row_mysql_handle_errors( ...@@ -644,6 +643,7 @@ row_mysql_handle_errors(
case DB_DICT_CHANGED: case DB_DICT_CHANGED:
case DB_TABLE_NOT_FOUND: case DB_TABLE_NOT_FOUND:
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
rollback_to_savept:
if (savept) { if (savept) {
/* Roll back the latest, possibly incomplete insertion /* Roll back the latest, possibly incomplete insertion
or update */ or update */
...@@ -667,6 +667,7 @@ row_mysql_handle_errors( ...@@ -667,6 +667,7 @@ row_mysql_handle_errors(
case DB_DEADLOCK: case DB_DEADLOCK:
case DB_LOCK_TABLE_FULL: case DB_LOCK_TABLE_FULL:
rollback:
/* Roll back the whole transaction; this resolution was added /* Roll back the whole transaction; this resolution was added
to version 3.23.43 */ to version 3.23.43 */
...@@ -696,14 +697,14 @@ row_mysql_handle_errors( ...@@ -696,14 +697,14 @@ row_mysql_handle_errors(
"InnoDB: you dump the tables, look at\n" "InnoDB: you dump the tables, look at\n"
"InnoDB: " REFMAN "forcing-innodb-recovery.html" "InnoDB: " REFMAN "forcing-innodb-recovery.html"
" for help.\n", stderr); " for help.\n", stderr);
break; goto rollback_to_savept;
case DB_FOREIGN_EXCEED_MAX_CASCADE: case DB_FOREIGN_EXCEED_MAX_CASCADE:
fprintf(stderr, "InnoDB: Cannot delete/update rows with" fprintf(stderr, "InnoDB: Cannot delete/update rows with"
" cascading foreign key constraints that exceed max" " cascading foreign key constraints that exceed max"
" depth of %lu\n" " depth of %lu\n"
"Please drop excessive foreign constraints" "Please drop excessive foreign constraints"
" and try again\n", (ulong) DICT_FK_MAX_RECURSIVE_LOAD); " and try again\n", (ulong) DICT_FK_MAX_RECURSIVE_LOAD);
break; goto rollback_to_savept;
default: default:
fprintf(stderr, "InnoDB: unknown error code %lu\n", fprintf(stderr, "InnoDB: unknown error code %lu\n",
(ulong) err); (ulong) err);
......
...@@ -615,8 +615,7 @@ row_mysql_handle_errors( ...@@ -615,8 +615,7 @@ row_mysql_handle_errors(
switch (err) { switch (err) {
case DB_LOCK_WAIT_TIMEOUT: case DB_LOCK_WAIT_TIMEOUT:
if (row_rollback_on_timeout) { if (row_rollback_on_timeout) {
trx_rollback_to_savepoint(trx, NULL); goto rollback;
break;
} }
/* fall through */ /* fall through */
case DB_DUPLICATE_KEY: case DB_DUPLICATE_KEY:
...@@ -635,6 +634,7 @@ row_mysql_handle_errors( ...@@ -635,6 +634,7 @@ row_mysql_handle_errors(
case DB_DICT_CHANGED: case DB_DICT_CHANGED:
case DB_TABLE_NOT_FOUND: case DB_TABLE_NOT_FOUND:
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
rollback_to_savept:
if (savept) { if (savept) {
/* Roll back the latest, possibly incomplete insertion /* Roll back the latest, possibly incomplete insertion
or update */ or update */
...@@ -658,6 +658,7 @@ row_mysql_handle_errors( ...@@ -658,6 +658,7 @@ row_mysql_handle_errors(
case DB_DEADLOCK: case DB_DEADLOCK:
case DB_LOCK_TABLE_FULL: case DB_LOCK_TABLE_FULL:
rollback:
/* Roll back the whole transaction; this resolution was added /* Roll back the whole transaction; this resolution was added
to version 3.23.43 */ to version 3.23.43 */
...@@ -687,14 +688,14 @@ row_mysql_handle_errors( ...@@ -687,14 +688,14 @@ row_mysql_handle_errors(
"InnoDB: you dump the tables, look at\n" "InnoDB: you dump the tables, look at\n"
"InnoDB: " REFMAN "forcing-innodb-recovery.html" "InnoDB: " REFMAN "forcing-innodb-recovery.html"
" for help.\n", stderr); " for help.\n", stderr);
break; goto rollback_to_savept;
case DB_FOREIGN_EXCEED_MAX_CASCADE: case DB_FOREIGN_EXCEED_MAX_CASCADE:
fprintf(stderr, "InnoDB: Cannot delete/update rows with" fprintf(stderr, "InnoDB: Cannot delete/update rows with"
" cascading foreign key constraints that exceed max" " cascading foreign key constraints that exceed max"
" depth of %lu\n" " depth of %lu\n"
"Please drop excessive foreign constraints" "Please drop excessive foreign constraints"
" and try again\n", (ulong) DICT_FK_MAX_RECURSIVE_LOAD); " and try again\n", (ulong) DICT_FK_MAX_RECURSIVE_LOAD);
break; goto rollback_to_savept;
default: default:
fprintf(stderr, "InnoDB: unknown error code %lu\n", fprintf(stderr, "InnoDB: unknown error code %lu\n",
(ulong) err); (ulong) err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment