Commit 5e3bf616 authored by marko's avatar marko

branches/zip: page_copy_rec_list_end(): Add the assertion ut_a(ret_pos > 0)

that was suggested by Sunny in Mantis issue#52.
parent 59790220
......@@ -598,6 +598,8 @@ page_copy_rec_list_end(
ut_ad(buf_block_get_frame(block) == page);
ut_ad(page_is_leaf(page) == page_is_leaf(new_page));
ut_ad(page_is_comp(page) == page_is_comp(new_page));
/* Here, "ret" may be pointing to a user record or the
predefined supremum record. */
if (UNIV_LIKELY_NULL(new_page_zip)) {
log_mode = mtr_set_log_mode(mtr, MTR_LOG_NONE);
......@@ -620,6 +622,12 @@ page_copy_rec_list_end(
store the number of preceding records on the page. */
ulint ret_pos
= page_rec_get_n_recs_before(ret);
/* Before copying, "ret" was the successor of
the predefined infimum record. It must still
have at least one predecessor (the predefined
infimum record, or a freshly copied record
that is smaller than "ret"). */
ut_a(ret_pos > 0);
if (UNIV_UNLIKELY
(!page_zip_reorganize(new_block, index, 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