Browse Source

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 971e1d8677.
pull/970/head
Marko Mäkelä 7 years ago
parent
commit
8fe34dd45f
  1. 7
      storage/innobase/handler/handler0alter.cc

7
storage/innobase/handler/handler0alter.cc

@ -172,9 +172,12 @@ inline void dict_table_t::prepare_instant(const dict_table_t& old,
DBUG_ASSERT(n_dropped() == 0);
DBUG_ASSERT(old.n_cols == old.n_def);
DBUG_ASSERT(n_cols == n_def);
DBUG_ASSERT(old.not_redundant() == not_redundant());
DBUG_ASSERT(old.supports_instant());
DBUG_ASSERT(supports_instant());
/* supports_instant() does not necessarily hold here,
in case ROW_FORMAT=COMPRESSED according to the
MariaDB data dictionary, and ALTER_OPTIONS was not set.
If that is the case, the instant ALTER TABLE would keep
the InnoDB table in its current format. */
dict_index_t& oindex = *old.indexes.start;
dict_index_t& index = *indexes.start;

Loading…
Cancel
Save