summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/innobase/handler/handler0alter.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 8ff36bc4bdd..c7397a9310e 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -11276,7 +11276,8 @@ err_index:
}
DBUG_EXECUTE_IF("stats_lock_fail",
- error = DB_LOCK_WAIT_TIMEOUT;);
+ error = DB_LOCK_WAIT_TIMEOUT;
+ trx_rollback_for_mysql(trx););
if (error == DB_SUCCESS) {
error = lock_sys_tables(trx);
@@ -11294,6 +11295,15 @@ err_index:
if (fts_exist) {
purge_sys.resume_FTS();
}
+
+ /* Rollbacked the transaction.
+ So restart the transaction to remove the
+ newly created table or index from data dictionary
+ and table cache in rollback_inplace_alter_table() */
+ if (trx->state == TRX_STATE_NOT_STARTED) {
+ trx_start_for_ddl(trx);
+ }
+
DBUG_RETURN(true);
}