Skip to content

Commit

Permalink
MDEV-20814 Assertion index->is_instant() failed on trivial upgrade fr…
Browse files Browse the repository at this point in the history
…om 10.1

rec_init_offsets(): Relax the assertion that was added in
commit 01f45be
to catch ROW_FORMAT=REDUNDANT records that have fewer fields
than expected.

This assertion would fail when accessing the records of the
built-in InnoDB table SYS_INDEXES. The column MERGE_THRESHOLD
had been effectively instantly added in MariaDB Server 10.2
(and MySQL 5.7), but is_instant() does not hold for that index.
Relax the assertion, so that it will not fail in this case.
  • Loading branch information
dr-m committed Oct 12, 2019
1 parent bb450b1 commit fa6c606
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storage/innobase/rem/rem0rec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,9 @@ rec_init_offsets(
}

if (i < rec_offs_n_fields(offsets)) {
ut_ad(index->is_instant());
ut_ad(index->is_instant()
|| i + (index->id == DICT_INDEXES_ID)
== rec_offs_n_fields(offsets));

offs = (rec_offs_base(offsets)[i] & REC_OFFS_MASK)
| REC_OFFS_DEFAULT;
Expand Down

0 comments on commit fa6c606

Please sign in to comment.