summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-06-16 09:53:46 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-06-16 09:53:46 +0300
commite99ba4ac8d13c4203f307ec2b477f1ef891866f5 (patch)
tree1fa53f6eb48de213fda08c4fea3fa52ebdbd1382
parent253806dffc6e80a3bebb1d7fa2fa4b1899252306 (diff)
downloadmariadb-git-e99ba4ac8d13c4203f307ec2b477f1ef891866f5.tar.gz
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.
-rw-r--r--storage/innobase/handler/handler0alter.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 889a53889d2..4a8861dd5dc 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -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);
}