Skip to content

Commit

Permalink
MDEV-26012 InnoDB purge and shutdown hangs after failed ALTER TABLE
Browse files Browse the repository at this point in the history
ha_innobase::commit_inplace_alter_table(): Invoke
purge_sys.resume_FTS() on all error handling paths
if purge_sys.stop_FTS() had been called.

This fixes a regression that had been introduced in
commit 1bd681c (MDEV-25506).
  • Loading branch information
dr-m committed Jun 24, 2021
1 parent 033e29b commit 82fe83a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions storage/innobase/handler/handler0alter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10885,6 +10885,9 @@ ha_innobase::commit_inplace_alter_table(
lock_fail:
my_error_innodb(
error, table_share->table_name.str, 0);
if (fts_exist) {
purge_sys.resume_FTS();
}
DBUG_RETURN(true);
} else if ((ctx->new_table->flags2
& (DICT_TF2_FTS_HAS_DOC_ID | DICT_TF2_FTS))
Expand Down Expand Up @@ -10916,6 +10919,9 @@ ha_innobase::commit_inplace_alter_table(
DBUG_ASSERT(ctx->need_rebuild());
if (alter_rebuild_apply_log(ctx, ha_alter_info,
altered_table)) {
if (fts_exist) {
purge_sys.resume_FTS();
}
DBUG_RETURN(true);
}
}
Expand Down

0 comments on commit 82fe83a

Please sign in to comment.