MDEV-13228 Assertion `n < rec_offs_n_fields(offsets)' failed in rec_get_nth_field_offs upon crash recovery with compressed table

In my preparatory patch for MDEV-12288, there was an off-by-one
array initialization error that affected debug builds.
This commit is contained in:
Marko Mäkelä 2017-07-03 12:13:01 +03:00
parent 56ff6f1b0b
commit d438a448e6

View file

@ -4601,7 +4601,7 @@ btr_cur_parse_del_mark_set_clust_rec(
btr_rec_set_deleted_flag(rec, page_zip, val);
ut_ad(pos <= MAX_REF_PARTS);
ulint offsets[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
ulint offsets[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 3];
rec_offs_init(offsets);
mem_heap_t* heap = NULL;
@ -4609,7 +4609,7 @@ btr_cur_parse_del_mark_set_clust_rec(
row_upd_rec_sys_fields_in_recovery(
rec, page_zip,
rec_get_offsets(rec, index, offsets,
pos + 1, &heap),
pos + 2, &heap),
pos, trx_id, roll_ptr);
} else {
/* In delete-marked records, DB_TRX_ID must