Commit 3055b6b9 authored by marko's avatar marko

branches/zip: Add debug assertions about page_zip->m_end < paeg_zip->m_size.

parent 44175381
......@@ -1851,6 +1851,7 @@ zlib_done:
goto err_exit;
}
page_zip->m_end = mod_log_ptr - page_zip->data;
ut_ad(page_zip->m_end < page_zip->size);
}
if (UNIV_UNLIKELY(!page_zip_set_extra_bytes(
......@@ -2292,6 +2293,7 @@ page_zip_write_rec(
}
ut_a(!*data);
ut_ad((ulint) (data - page_zip->data) < page_zip->size);
page_zip->m_end = data - page_zip->data;
#ifdef UNIV_ZIP_DEBUG
......@@ -2700,6 +2702,7 @@ page_zip_clear_rec(
}
*data++ = (heap_no - 1) << 1 | 1;
ut_ad(!*data);
ut_ad((ulint) (data - page_zip->data) < page_zip->size);
page_zip->m_end = data - page_zip->data;
#ifdef UNIV_ZIP_DEBUG
ut_a(page_zip_validate(page_zip, page));
......@@ -3125,6 +3128,7 @@ 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;
ut_ad(page_zip->m_end < page_zip->size);
if (!page_is_leaf(src)
&& UNIV_UNLIKELY(mach_read_from_4((byte*) src
......
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