Skip to content

Commit

Permalink
MDEV-14022 Upgrade from 10.0/10.1 fails on assertion
Browse files Browse the repository at this point in the history
rec_offs_validate(), rec_get_offsets_func(): Tolerate SYS_INDEXES
records where the last column MERGE_THRESHOLD is missing. This
column was added in MySQL 5.7 and MariaDB 10.2.2. For tables that
were created earlier, the column will be missing.
  • Loading branch information
dr-m committed Oct 9, 2017
1 parent 2d2f857 commit 1a4c632
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions storage/innobase/rem/rem0rec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,8 @@ rec_offs_validate(
ut_ad(is_user_rec || n == 1);
ut_ad(is_user_rec || i == 1);
ut_ad(!is_user_rec || n >= i || !index
|| n >= index->n_core_fields);
|| (n + (index->id == DICT_INDEXES_ID))
>= index->n_core_fields);
for (; n < i; n++) {
ut_ad(rec_offs_base(offsets)[1 + n]
& REC_OFFS_DEFAULT);
Expand Down Expand Up @@ -842,7 +843,8 @@ rec_get_offsets_func(
ut_ad(!is_user_rec || !leaf || index->is_dummy
|| dict_index_is_ibuf(index)
|| n == n_fields /* btr_pcur_restore_position() */
|| (n >= index->n_core_fields && n <= index->n_fields));
|| (n + (index->id == DICT_INDEXES_ID)
>= index->n_core_fields && n <= index->n_fields));

if (is_user_rec && leaf && n < index->n_fields) {
ut_ad(!index->is_dummy);
Expand Down

0 comments on commit 1a4c632

Please sign in to comment.