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.
This commit is contained in:
marko 2005-11-30 23:09:36 +00:00
parent 77c570dc4d
commit 05fbb8ca9d
2 changed files with 5 additions and 3 deletions

View file

@ -502,7 +502,7 @@ buf_flush_init_for_writing(
+ (PAGE_HEADER + PAGE_LEVEL)), + (PAGE_HEADER + PAGE_LEVEL)),
(ulong) page_zip->m_start, (ulong) page_zip->m_start,
(ulong) 2 (ulong) 2
* page_dir_get_n_heap(page_zip->data)); * (page_dir_get_n_heap(page_zip->data) - 2));
page_zip->data = NULL; page_zip->data = NULL;
} }

View file

@ -682,8 +682,10 @@ first_inflate:
ut_a(d_stream.avail_out < UNIV_PAGE_SIZE ut_a(d_stream.avail_out < UNIV_PAGE_SIZE
- PAGE_ZIP_START - PAGE_DIR); - PAGE_ZIP_START - PAGE_DIR);
/* set heap_no and the status bits */ if (UNIV_LIKELY(d_stream.avail_out != 0)) {
mach_write_to_2(dst - REC_NEW_HEAP_NO, heap_status); /* set heap_no and the status bits */
mach_write_to_2(dst - REC_NEW_HEAP_NO, heap_status);
}
err = inflate(&d_stream, Z_FINISH); err = inflate(&d_stream, Z_FINISH);