Commit 91b39ec6 authored by marko's avatar marko

branches/innodb+: Merge revisions 3599:3602 from branches/zip:

  ------------------------------------------------------------------------
  r3602 | marko | 2008-12-22 16:40:17 +0200 (Mon, 22 Dec 2008) | 6 lines

  branches/zip: page_cur_insert_rec_zip(): When allocating insert_buf from
  the free list, zero out the node pointer field of the deleted record if
  the new record would not overwrite it.  This fixes a harmless content
  mismatch reported by page_zip_validate() that was reported as Issue #147.

  rb://66 approved by Heikki Tuuri
  ------------------------------------------------------------------------
parent a4f279a2
......@@ -1285,7 +1285,21 @@ page_cur_insert_rec_zip(
rec_get_next_ptr(free_rec, TRUE),
rec_size);
if (page_is_leaf(page) && dict_index_is_clust(index)) {
if (!page_is_leaf(page)) {
/* Zero out the node pointer of free_rec,
in case it will not be overwritten by
insert_rec. */
ut_ad(rec_size > REC_NODE_PTR_SIZE);
if (rec_offs_extra_size(foffsets)
+ rec_offs_data_size(foffsets) > rec_size) {
memset(rec_get_end(free_rec, foffsets)
- REC_NODE_PTR_SIZE, 0,
REC_NODE_PTR_SIZE);
}
} else if (dict_index_is_clust(index)) {
/* Zero out the DB_TRX_ID and DB_ROLL_PTR
columns of free_rec, in case it will not be
overwritten by insert_rec. */
......
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