Commit 27d21c0f authored by marko's avatar marko

branches/zip: Remove a potential assertion failure.

btr_lift_page_up(): If page_copy_rec_list_end() fails, resort to
page_zip_copy().

page_zip_copy(): Validate the copy of the page.
parent 3b21e147
......@@ -2111,13 +2111,15 @@ btr_lift_page_up(
on a non-leaf page has the min_rec_mark set. */
btr_page_set_level(father_page, father_page_zip, page_level, mtr);
/* Move records to the father */
if (!page_copy_rec_list_end(father_page, father_page_zip,
page_get_infimum_rec(page), index, mtr)) {
/* This should always succeed, as father_page
is created from the scratch and receives
the records in sorted order. */
ut_error;
/* Copy the records to the father page one by one. */
if (UNIV_UNLIKELY(!page_copy_rec_list_end(father_page, father_page_zip,
page_get_infimum_rec(page), index, mtr))) {
ut_a(father_page_zip);
/* Copy the page byte for byte. */
page_zip_copy(father_page_zip, father_page,
buf_block_get_page_zip(buf_block_align(page)),
page, mtr);
}
lock_update_copy_and_discard(father_page, page);
......
......@@ -2956,6 +2956,11 @@ page_zip_copy(
page_zip->n_blobs = src_zip->n_blobs;
page_zip->m_start = src_zip->m_start;
page_zip->m_end = src_zip->m_end;
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
ut_a(page_zip_validate(page_zip, page));
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
page_zip_compress_write_log(page_zip, page, mtr);
}
......
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