Skip to content

Commit

Permalink
MDEV-28864 Assertion `trx_id <= create_id' failed in innodb_check_ver…
Browse files Browse the repository at this point in the history
…sion()

ha_innobase::prepare_inplace_alter_table(): If the ALTER TABLE
operation is no-op for InnoDB, do reset m_prebuilt->trx_id
so that ha_innobase::table_version() will always report either 0
or the identifier of the transaction that would commit changes
to the InnoDB data dictionary.

The failure scenario involved a completed DROP INDEX followed by
a no-op ALTER TABLE during which the server was killed.
An effort to create a reproducible test failed.
  • Loading branch information
dr-m committed Jun 16, 2022
1 parent 253806d commit e99ba4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions storage/innobase/handler/handler0alter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7614,6 +7614,7 @@ ha_innobase::prepare_inplace_alter_table(
if (!(ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE)) {
/* Nothing to do */
DBUG_ASSERT(!m_prebuilt->trx->dict_operation_lock_mode);
m_prebuilt->trx_id = 0;
DBUG_RETURN(false);
}

Expand Down

0 comments on commit e99ba4a

Please sign in to comment.