Commit 4596d491 authored by marko's avatar marko

branches/zip: Minor bug fix. test-insert still does not pass.

page_zip_compress(): Assert that trx_id and roll_ptr are zero for
deleted records.

page_zip_clear_rec(): Remove comment about need for redo logging.
This operationg is already logged on a higher level.

page_delete_rec_list_end(): Always invoke page_zip_clear_rec()
on compressed pages.
parent f2204447
...@@ -839,7 +839,8 @@ page_delete_rec_list_end( ...@@ -839,7 +839,8 @@ page_delete_rec_list_end(
last_rec = page_rec_get_prev(page_get_supremum_rec(page)); last_rec = page_rec_get_prev(page_get_supremum_rec(page));
if ((size == ULINT_UNDEFINED) || (n_recs == ULINT_UNDEFINED)) { if ((size == ULINT_UNDEFINED) || (n_recs == ULINT_UNDEFINED)
|| UNIV_LIKELY_NULL(page_zip)) {
rec_t* rec2 = rec; rec_t* rec2 = rec;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
......
...@@ -675,6 +675,11 @@ page_zip_compress( ...@@ -675,6 +675,11 @@ page_zip_compress(
ut_ad(!c_stream.avail_in); ut_ad(!c_stream.avail_in);
ut_ad(c_stream.next_in == src); ut_ad(c_stream.next_in == src);
ut_ad(slot < page_get_n_recs(
(page_t*) page)
|| !memcmp(src, zero,
DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN));
memcpy(storage - (DATA_TRX_ID_LEN memcpy(storage - (DATA_TRX_ID_LEN
+ DATA_ROLL_PTR_LEN) + DATA_ROLL_PTR_LEN)
* (rec_get_heap_no_new(rec) - 1), * (rec_get_heap_no_new(rec) - 1),
...@@ -2327,7 +2332,6 @@ page_zip_clear_rec( ...@@ -2327,7 +2332,6 @@ page_zip_clear_rec(
/* Do not touch the extra bytes, because the /* Do not touch the extra bytes, because the
decompressor depends on them. */ decompressor depends on them. */
memset(rec, 0, rec_offs_data_size(offsets)); memset(rec, 0, rec_offs_data_size(offsets));
/* TODO: maybe log the memset()s? */
if (UNIV_UNLIKELY(!page_zip_compress(page_zip, if (UNIV_UNLIKELY(!page_zip_compress(page_zip,
ut_align_down(rec, UNIV_PAGE_SIZE), ut_align_down(rec, UNIV_PAGE_SIZE),
......
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