Commit 7255b3fd authored by marko's avatar marko

branches/zip: page_zip_decompress_low(): Clear the node_ptr during

initial decompression, in case the record will be deleted and the
space will be reused by a smaller record.

page_zip_clear_rec_disable: Note the possibility of a page_zip_validate()
failure when the space of a deleted record is reused by a smaller record.
parent e148206a
......@@ -1816,6 +1816,10 @@ page_zip_decompress_low(
goto zlib_error;
}
/* Clear the node pointer in case the record
will be deleted and the space will be reallocated
to a smaller record. */
memset(d_stream.next_out, 0, REC_NODE_PTR_SIZE);
d_stream.next_out += REC_NODE_PTR_SIZE;
}
......@@ -2677,7 +2681,9 @@ page_zip_write_trx_id_and_roll_ptr(
#ifdef UNIV_ZIP_DEBUG
/* Set this variable in a debugger to disable page_zip_clear_rec().
The only observable effect should be the compression ratio due to
deleted records not being zeroed out. */
deleted records not being zeroed out. In rare cases, there can be
page_zip_validate() failures on the node_ptr, trx_id and roll_ptr
columns if the space is reallocated for a smaller record. */
ibool page_zip_clear_rec_disable;
#endif /* UNIV_ZIP_DEBUG */
......
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