Commit bcd03127 authored by unknown's avatar unknown

Remove unused function rec_offs_nth_null().

rec_offs_nth_extern(): Return zero/nonzero instead of FALSE/TRUE.


innobase/row/row0upd.c:
  Normalize the return value of rec_offs_nth_extern() to FALSE/TRUE.
  Avoid a repeated call to upd_ext_vec_contains().
parent 949112c1
......@@ -303,21 +303,12 @@ rec_offs_comp(
/* out: TRUE if compact format */
const ulint* offsets);/* in: array returned by rec_get_offsets() */
/**********************************************************
Returns TRUE if the nth field of rec is SQL NULL. */
Returns nonzero if the extern bit is set in nth field of rec. */
UNIV_INLINE
ibool
rec_offs_nth_null(
/*==============*/
/* out: TRUE if SQL NULL */
const ulint* offsets,/* in: array returned by rec_get_offsets() */
ulint n); /* in: nth field */
/**********************************************************
Returns TRUE if the extern bit is set in nth field of rec. */
UNIV_INLINE
ibool
ulint
rec_offs_nth_extern(
/*================*/
/* out: TRUE if externally stored */
/* out: nonzero if externally stored */
const ulint* offsets,/* in: array returned by rec_get_offsets() */
ulint n); /* in: nth field */
/**********************************************************
......
......@@ -939,32 +939,19 @@ rec_offs_comp(
}
/**********************************************************
Returns TRUE if the nth field of rec is SQL NULL. */
Returns nonzero if the extern bit is set in nth field of rec. */
UNIV_INLINE
ibool
rec_offs_nth_null(
/*==============*/
/* out: TRUE if SQL NULL */
const ulint* offsets,/* in: array returned by rec_get_offsets() */
ulint n) /* in: nth field */
{
ut_ad(rec_offs_validate(NULL, NULL, offsets));
ut_ad(n < rec_offs_n_fields(offsets));
return((rec_offs_base(offsets)[1 + n] & REC_OFFS_SQL_NULL) != 0);
}
/**********************************************************
Returns TRUE if the extern bit is set in nth field of rec. */
UNIV_INLINE
ibool
ulint
rec_offs_nth_extern(
/*================*/
/* out: TRUE if externally stored */
/* out: nonzero if externally stored */
const ulint* offsets,/* in: array returned by rec_get_offsets() */
ulint n) /* in: nth field */
{
ut_ad(rec_offs_validate(NULL, NULL, offsets));
ut_ad(n < rec_offs_n_fields(offsets));
return((rec_offs_base(offsets)[1 + n] & REC_OFFS_EXTERNAL) != 0);
return(UNIV_UNLIKELY(rec_offs_base(offsets)[1 + n]
& REC_OFFS_EXTERNAL));
}
/**********************************************************
......
......@@ -815,9 +815,10 @@ row_upd_build_difference_binary(
goto skip_compare;
}
extern_bit = rec_offs_nth_extern(offsets, i);
extern_bit = upd_ext_vec_contains(ext_vec, n_ext_vec, i);
if (extern_bit != upd_ext_vec_contains(ext_vec, n_ext_vec, i)
if (UNIV_UNLIKELY(extern_bit ==
!rec_offs_nth_extern(offsets, i))
|| !dfield_data_is_binary_equal(dfield, len, data)) {
upd_field = upd_get_nth_field(update, n_diff);
......@@ -826,12 +827,8 @@ row_upd_build_difference_binary(
upd_field_set_field_no(upd_field, i, index, trx);
if (upd_ext_vec_contains(ext_vec, n_ext_vec, i)) {
upd_field->extern_storage = TRUE;
} else {
upd_field->extern_storage = FALSE;
}
upd_field->extern_storage = extern_bit;
n_diff++;
}
skip_compare:
......
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