Commit 05fbb8ca authored by marko's avatar marko

branches/zip:

buf_flush_init_for_writing(): The reported dense page directory size was
4 bytes too much.  Subtract 2 (infimum and supremum) from n_heap.

page_zip_decompress(): When decompressing the last user record, only set
heap_no and the status bits if there is data to decode, i.e., there
are user records on the page.
parent 77c570dc
......@@ -502,7 +502,7 @@ buf_flush_init_for_writing(
+ (PAGE_HEADER + PAGE_LEVEL)),
(ulong) page_zip->m_start,
(ulong) 2
* page_dir_get_n_heap(page_zip->data));
* (page_dir_get_n_heap(page_zip->data) - 2));
page_zip->data = NULL;
}
......
......@@ -682,8 +682,10 @@ page_zip_decompress(
ut_a(d_stream.avail_out < UNIV_PAGE_SIZE
- PAGE_ZIP_START - PAGE_DIR);
/* set heap_no and the status bits */
mach_write_to_2(dst - REC_NEW_HEAP_NO, heap_status);
if (UNIV_LIKELY(d_stream.avail_out != 0)) {
/* set heap_no and the status bits */
mach_write_to_2(dst - REC_NEW_HEAP_NO, heap_status);
}
err = inflate(&d_stream, Z_FINISH);
......
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