mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
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.
This commit is contained in:
parent
2d2f857fb3
commit
1a4c63238c
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue