mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 11:31:51 +01:00
branches/zip: btr_store_big_rec_extern_fields(),
btr_free_externally_stored_field(): Replace mlog_write_ulint() with mach_write_to_4() when page_zip != NULL. The operation is logged by page_zip_write_blob_ptr().
This commit is contained in:
parent
ffab57c6c2
commit
1ef8a89c98
1 changed files with 25 additions and 26 deletions
|
@ -3707,37 +3707,29 @@ btr_store_big_rec_extern_fields(
|
||||||
buf_page_dbg_add_level(
|
buf_page_dbg_add_level(
|
||||||
rec_page, SYNC_NO_ORDER_CHECK);
|
rec_page, SYNC_NO_ORDER_CHECK);
|
||||||
#endif /* UNIV_SYNC_DEBUG */
|
#endif /* UNIV_SYNC_DEBUG */
|
||||||
mlog_write_ulint(field_ref
|
|
||||||
+ BTR_EXTERN_LEN, 0,
|
|
||||||
MLOG_4BYTES, &mtr);
|
|
||||||
|
|
||||||
if (err == Z_STREAM_END) {
|
if (err == Z_STREAM_END) {
|
||||||
mlog_write_ulint(field_ref
|
mach_write_to_4(field_ref
|
||||||
|
+ BTR_EXTERN_LEN, 0);
|
||||||
|
mach_write_to_4(field_ref
|
||||||
+ BTR_EXTERN_LEN + 4,
|
+ BTR_EXTERN_LEN + 4,
|
||||||
c_stream.total_in,
|
c_stream.total_in);
|
||||||
MLOG_4BYTES, &mtr);
|
|
||||||
} else {
|
} else {
|
||||||
mlog_write_ulint(field_ref
|
memset(field_ref + BTR_EXTERN_LEN,
|
||||||
+ BTR_EXTERN_LEN + 4,
|
0, 8);
|
||||||
0,
|
|
||||||
MLOG_4BYTES, &mtr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prev_page_no == FIL_NULL) {
|
if (prev_page_no == FIL_NULL) {
|
||||||
mlog_write_ulint(field_ref
|
mach_write_to_4(field_ref
|
||||||
+ BTR_EXTERN_SPACE_ID,
|
+ BTR_EXTERN_SPACE_ID,
|
||||||
space_id,
|
space_id);
|
||||||
MLOG_4BYTES, &mtr);
|
|
||||||
|
|
||||||
mlog_write_ulint(field_ref
|
mach_write_to_4(field_ref
|
||||||
+ BTR_EXTERN_PAGE_NO,
|
+ BTR_EXTERN_PAGE_NO,
|
||||||
page_no,
|
page_no);
|
||||||
MLOG_4BYTES, &mtr);
|
|
||||||
|
|
||||||
mlog_write_ulint(field_ref
|
mach_write_to_4(field_ref
|
||||||
+ BTR_EXTERN_OFFSET,
|
+ BTR_EXTERN_OFFSET,
|
||||||
FIL_PAGE_NEXT,
|
FIL_PAGE_NEXT);
|
||||||
MLOG_4BYTES, &mtr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
page_zip_write_blob_ptr(page_zip, rec,
|
page_zip_write_blob_ptr(page_zip, rec,
|
||||||
|
@ -3933,15 +3925,21 @@ btr_free_externally_stored_field(
|
||||||
btr_page_free_low(index->tree, page,
|
btr_page_free_low(index->tree, page,
|
||||||
space_id, page_no, 0, &mtr);
|
space_id, page_no, 0, &mtr);
|
||||||
|
|
||||||
mlog_write_ulint(field_ref + BTR_EXTERN_PAGE_NO,
|
if (UNIV_LIKELY(page_zip != NULL)) {
|
||||||
|
mach_write_to_4(field_ref + BTR_EXTERN_PAGE_NO,
|
||||||
|
next_page_no);
|
||||||
|
mach_write_to_4(field_ref + BTR_EXTERN_LEN + 4,
|
||||||
|
0);
|
||||||
|
page_zip_write_blob_ptr(page_zip, rec, index,
|
||||||
|
offsets, i, &mtr);
|
||||||
|
} else {
|
||||||
|
mlog_write_ulint(field_ref
|
||||||
|
+ BTR_EXTERN_PAGE_NO,
|
||||||
next_page_no,
|
next_page_no,
|
||||||
MLOG_4BYTES, &mtr);
|
MLOG_4BYTES, &mtr);
|
||||||
mlog_write_ulint(field_ref + BTR_EXTERN_LEN + 4,
|
mlog_write_ulint(field_ref
|
||||||
0,
|
+ BTR_EXTERN_LEN + 4, 0,
|
||||||
MLOG_4BYTES, &mtr);
|
MLOG_4BYTES, &mtr);
|
||||||
if (page_zip) {
|
|
||||||
page_zip_write_blob_ptr(page_zip,
|
|
||||||
rec, index, offsets, i, &mtr);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ulint extern_len = mach_read_from_4(
|
ulint extern_len = mach_read_from_4(
|
||||||
|
@ -3949,6 +3947,7 @@ btr_free_externally_stored_field(
|
||||||
ulint part_len = btr_blob_get_part_len(
|
ulint part_len = btr_blob_get_part_len(
|
||||||
page + FIL_PAGE_DATA);
|
page + FIL_PAGE_DATA);
|
||||||
|
|
||||||
|
ut_a(!page_zip);
|
||||||
ut_a(extern_len >= part_len);
|
ut_a(extern_len >= part_len);
|
||||||
|
|
||||||
next_page_no = mach_read_from_4(page + FIL_PAGE_DATA
|
next_page_no = mach_read_from_4(page + FIL_PAGE_DATA
|
||||||
|
|
Loading…
Add table
Reference in a new issue