Commit e99ba4ac authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-28864 Assertion `trx_id <= create_id' failed in innodb_check_version()

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.
parent 253806df
......@@ -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);
}
......
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