Skip to content

Commit 8fe34dd

Browse files
committed
MDEV-17831 Assertion `supports_instant()' failed in dict_table_t::prepare_instant upon ADD COLUMN on table with KEY_BLOCK_SIZE
dict_table_t::prepare_instant(): Remove too strict assertions that could fail if the MariaDB and InnoDB data dictionaries are out of sync. That the dictionaries got out of sync during TRUNCATE TABLE is a separate bug was fixed in 10.2 by commit 971e1d8.
1 parent 4447a02 commit 8fe34dd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

storage/innobase/handler/handler0alter.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,12 @@ inline void dict_table_t::prepare_instant(const dict_table_t& old,
172172
DBUG_ASSERT(n_dropped() == 0);
173173
DBUG_ASSERT(old.n_cols == old.n_def);
174174
DBUG_ASSERT(n_cols == n_def);
175-
DBUG_ASSERT(old.not_redundant() == not_redundant());
176175
DBUG_ASSERT(old.supports_instant());
177-
DBUG_ASSERT(supports_instant());
176+
/* supports_instant() does not necessarily hold here,
177+
in case ROW_FORMAT=COMPRESSED according to the
178+
MariaDB data dictionary, and ALTER_OPTIONS was not set.
179+
If that is the case, the instant ALTER TABLE would keep
180+
the InnoDB table in its current format. */
178181

179182
dict_index_t& oindex = *old.indexes.start;
180183
dict_index_t& index = *indexes.start;

0 commit comments

Comments
 (0)