summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-10-12 21:58:34 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-10-12 21:58:34 +0300
commitfa6c6062574f091638f1143ef67eee4fc111fb32 (patch)
tree3d3ffdaeb5b0be7a96f905406e92018d0ba2fbe9
parentbb450b1fed862e7371db2dc8df8aae6f926261b0 (diff)
downloadmariadb-git-fa6c6062574f091638f1143ef67eee4fc111fb32.tar.gz
MDEV-20814 Assertion index->is_instant() failed on trivial upgrade from 10.1
rec_init_offsets(): Relax the assertion that was added in commit 01f45becd1b71433e240959228e35266f271bba1 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.
-rw-r--r--storage/innobase/rem/rem0rec.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc
index 8803e691498..7956c0fb62e 100644
--- a/storage/innobase/rem/rem0rec.cc
+++ b/storage/innobase/rem/rem0rec.cc
@@ -742,7 +742,9 @@ resolved:
}
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;