Commit 94d4f129 authored by marko's avatar marko

branches/zip: Minor cleanup.

btr_rec_free_updated_extern_fields(): Remove the parameter
do_not_free_inherited, which is always passed as TRUE.

btr_cur_unmark_extern_fields(): Invoke rec_offs_any_extern().

btr_cur_unmark_dtuple_extern_fields(): Remove a local variable.
parent 72b15b17
...@@ -107,9 +107,6 @@ btr_rec_free_updated_extern_fields( ...@@ -107,9 +107,6 @@ btr_rec_free_updated_extern_fields(
part will be updated, or NULL */ part will be updated, or NULL */
const ulint* offsets,/* in: rec_get_offsets(rec, index) */ const ulint* offsets,/* in: rec_get_offsets(rec, index) */
upd_t* update, /* in: update vector */ upd_t* update, /* in: update vector */
ibool do_not_free_inherited,/* in: TRUE if called in a
rollback and we do not want to free
inherited fields */
mtr_t* mtr); /* in: mini-transaction handle which contains mtr_t* mtr); /* in: mini-transaction handle which contains
an X-latch to record page and to the tree */ an X-latch to record page and to the tree */
/*************************************************************** /***************************************************************
...@@ -2187,7 +2184,7 @@ btr_cur_pessimistic_update( ...@@ -2187,7 +2184,7 @@ btr_cur_pessimistic_update(
ut_a(big_rec_vec == NULL); ut_a(big_rec_vec == NULL);
btr_rec_free_updated_extern_fields(index, rec, page_zip, btr_rec_free_updated_extern_fields(index, rec, page_zip,
offsets, update, TRUE, mtr); offsets, update, mtr);
} }
/* We have to set appropriate extern storage bits in the new /* We have to set appropriate extern storage bits in the new
...@@ -3540,6 +3537,11 @@ btr_cur_unmark_extern_fields( ...@@ -3540,6 +3537,11 @@ btr_cur_unmark_extern_fields(
ut_ad(!rec_offs_comp(offsets) || !rec_get_node_ptr_flag(rec)); ut_ad(!rec_offs_comp(offsets) || !rec_get_node_ptr_flag(rec));
n = rec_offs_n_fields(offsets); n = rec_offs_n_fields(offsets);
if (!rec_offs_any_extern(offsets)) {
return;
}
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
if (rec_offs_nth_extern(offsets, i)) { if (rec_offs_nth_extern(offsets, i)) {
...@@ -3561,7 +3563,6 @@ btr_cur_unmark_dtuple_extern_fields( ...@@ -3561,7 +3563,6 @@ btr_cur_unmark_dtuple_extern_fields(
ulint n_ext_vec) /* in: number of elements in ext_vec */ ulint n_ext_vec) /* in: number of elements in ext_vec */
{ {
dfield_t* dfield; dfield_t* dfield;
ulint byte_val;
byte* data; byte* data;
ulint len; ulint len;
ulint i; ulint i;
...@@ -3574,11 +3575,7 @@ btr_cur_unmark_dtuple_extern_fields( ...@@ -3574,11 +3575,7 @@ btr_cur_unmark_dtuple_extern_fields(
len -= BTR_EXTERN_FIELD_REF_SIZE; len -= BTR_EXTERN_FIELD_REF_SIZE;
byte_val = mach_read_from_1(data + len + BTR_EXTERN_LEN); data[len + BTR_EXTERN_LEN] &= ~BTR_EXTERN_OWNER_FLAG;
byte_val = byte_val & (~BTR_EXTERN_OWNER_FLAG);
mach_write_to_1(data + len + BTR_EXTERN_LEN, byte_val);
} }
} }
...@@ -4302,9 +4299,6 @@ btr_rec_free_updated_extern_fields( ...@@ -4302,9 +4299,6 @@ btr_rec_free_updated_extern_fields(
part will be updated, or NULL */ part will be updated, or NULL */
const ulint* offsets,/* in: rec_get_offsets(rec, index) */ const ulint* offsets,/* in: rec_get_offsets(rec, index) */
upd_t* update, /* in: update vector */ upd_t* update, /* in: update vector */
ibool do_not_free_inherited,/* in: TRUE if called in a
rollback and we do not want to free
inherited fields */
mtr_t* mtr) /* in: mini-transaction handle which contains mtr_t* mtr) /* in: mini-transaction handle which contains
an X-latch to record page and to the tree */ an X-latch to record page and to the tree */
{ {
...@@ -4331,8 +4325,7 @@ btr_rec_free_updated_extern_fields( ...@@ -4331,8 +4325,7 @@ btr_rec_free_updated_extern_fields(
btr_free_externally_stored_field( btr_free_externally_stored_field(
index, data + len - BTR_EXTERN_FIELD_REF_SIZE, index, data + len - BTR_EXTERN_FIELD_REF_SIZE,
rec, offsets, page_zip, rec, offsets, page_zip,
ufield->field_no, ufield->field_no, TRUE, mtr);
do_not_free_inherited, mtr);
} }
} }
} }
......
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