Commit 23d19f8f authored by marko's avatar marko

branches/zip: Minor improvements.

btr_cur_pessimistic_update(): Remove extraneous page_zip_write_rec() call.

btr_cur_set_ownership_of_extern_field(): Simplify the logic.

row_upd_rec_in_place(): Make use of parameter "index" in debug assertions.

page_zip_write_rec(): Remove TODO comment about redo log record.
The write will already be covered by higher-level log entries.
parent 2dc343f6
......@@ -2079,10 +2079,6 @@ btr_cur_pessimistic_update(
page_zip, rec, index, offsets, mtr);
}
if (UNIV_LIKELY_NULL(page_zip)) {
page_zip_write_rec(page_zip, rec, index, offsets);
}
btr_cur_compress_if_useful(cursor, mtr);
err = DB_SUCCESS;
......@@ -3197,18 +3193,17 @@ btr_cur_set_ownership_of_extern_field(
byte_val = byte_val | BTR_EXTERN_OWNER_FLAG;
}
if (UNIV_LIKELY(mtr != NULL) && UNIV_LIKELY(!page_zip)) {
if (UNIV_LIKELY_NULL(page_zip)) {
mach_write_to_1(data + local_len + BTR_EXTERN_LEN, byte_val);
page_zip_write_blob_ptr(
page_zip, rec, index, offsets, i, mtr);
} else if (UNIV_LIKELY(mtr != NULL)) {
mlog_write_ulint(data + local_len + BTR_EXTERN_LEN, byte_val,
MLOG_1BYTE, mtr);
} else {
mach_write_to_1(data + local_len + BTR_EXTERN_LEN, byte_val);
}
if (UNIV_LIKELY_NULL(page_zip)) {
page_zip_write_blob_ptr(
page_zip, rec, index, offsets, i, mtr);
}
}
/***********************************************************************
......
......@@ -1903,9 +1903,6 @@ page_zip_write_rec(
ut_a(page_zip_validate(page_zip,
ut_align_down((byte*) rec, UNIV_PAGE_SIZE)));
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
/* TODO: write a redo log record (MLOG_ZIP_WRITE_REC),
or is it at all needed? */
}
/**************************************************************************
......
......@@ -456,7 +456,8 @@ row_upd_rec_in_place(
ulint n_fields;
ulint i;
ut_ad(rec_offs_validate(rec, NULL, offsets));
ut_ad(dict_index_is_clust(index));
ut_ad(rec_offs_validate(rec, index, offsets));
if (rec_offs_comp(offsets)) {
rec_set_info_bits_new(rec, update->info_bits);
......
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