Commit f0e4f94c authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-15871 Crash in btr_search_build_page_hash_index()

When skipping the MDEV-11369 'default row' record, check again
for an empty page.
parent 97e51d24
......@@ -1406,6 +1406,13 @@ btr_search_build_page_hash_index(
return;
}
rec = page_rec_get_next_const(page_get_infimum_rec(page));
if (rec_is_default_row(rec, index)) {
rec = page_rec_get_next_const(rec);
if (!--n_recs) return;
}
/* Calculate and cache fold values and corresponding records into
an array for fast insertion to the hash index */
......@@ -1417,12 +1424,6 @@ btr_search_build_page_hash_index(
ut_a(index->id == btr_page_get_index_id(page));
rec = page_rec_get_next_const(page_get_infimum_rec(page));
if (rec_is_default_row(rec, index)) {
rec = page_rec_get_next_const(rec);
}
offsets = rec_get_offsets(
rec, index, offsets, true,
btr_search_get_n_fields(n_fields, n_bytes),
......
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