Commit 1a4c6323 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-14022 Upgrade from 10.0/10.1 fails on assertion

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.
parent 2d2f857f
...@@ -515,7 +515,8 @@ rec_offs_validate( ...@@ -515,7 +515,8 @@ rec_offs_validate(
ut_ad(is_user_rec || n == 1); ut_ad(is_user_rec || n == 1);
ut_ad(is_user_rec || i == 1); ut_ad(is_user_rec || i == 1);
ut_ad(!is_user_rec || n >= i || !index 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++) { for (; n < i; n++) {
ut_ad(rec_offs_base(offsets)[1 + n] ut_ad(rec_offs_base(offsets)[1 + n]
& REC_OFFS_DEFAULT); & REC_OFFS_DEFAULT);
...@@ -842,7 +843,8 @@ rec_get_offsets_func( ...@@ -842,7 +843,8 @@ rec_get_offsets_func(
ut_ad(!is_user_rec || !leaf || index->is_dummy ut_ad(!is_user_rec || !leaf || index->is_dummy
|| dict_index_is_ibuf(index) || dict_index_is_ibuf(index)
|| n == n_fields /* btr_pcur_restore_position() */ || 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) { if (is_user_rec && leaf && n < index->n_fields) {
ut_ad(!index->is_dummy); ut_ad(!index->is_dummy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment