mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
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:
parent
77c570dc4d
commit
05fbb8ca9d
2 changed files with 5 additions and 3 deletions
|
@ -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 @@ first_inflate:
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue