mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +01:00
Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/M50/mysql-5.0
This commit is contained in:
commit
288b039477
1 changed files with 39 additions and 39 deletions
|
@ -373,6 +373,26 @@ rec_set_n_fields_old(
|
|||
REC_OLD_N_FIELDS_MASK, REC_OLD_N_FIELDS_SHIFT);
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
The following function retrieves the status bits of a new-style record. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
rec_get_status(
|
||||
/*===========*/
|
||||
/* out: status bits */
|
||||
rec_t* rec) /* in: physical record */
|
||||
{
|
||||
ulint ret;
|
||||
|
||||
ut_ad(rec);
|
||||
|
||||
ret = rec_get_bit_field_1(rec, REC_NEW_STATUS,
|
||||
REC_NEW_STATUS_MASK, REC_NEW_STATUS_SHIFT);
|
||||
ut_ad((ret & ~REC_NEW_STATUS_MASK) == 0);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
The following function is used to get the number of fields
|
||||
in a record. */
|
||||
|
@ -484,26 +504,6 @@ rec_set_info_bits(
|
|||
REC_INFO_BITS_MASK, REC_INFO_BITS_SHIFT);
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
The following function retrieves the status bits of a new-style record. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
rec_get_status(
|
||||
/*===========*/
|
||||
/* out: status bits */
|
||||
rec_t* rec) /* in: physical record */
|
||||
{
|
||||
ulint ret;
|
||||
|
||||
ut_ad(rec);
|
||||
|
||||
ret = rec_get_bit_field_1(rec, REC_NEW_STATUS,
|
||||
REC_NEW_STATUS_MASK, REC_NEW_STATUS_SHIFT);
|
||||
ut_ad((ret & ~REC_NEW_STATUS_MASK) == 0);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
The following function is used to set the status bits of a new-style record. */
|
||||
UNIV_INLINE
|
||||
|
@ -756,6 +756,25 @@ rec_offs_set_n_alloc(
|
|||
offsets[0] = n_alloc;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
The following function returns the number of fields in a record. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
rec_offs_n_fields(
|
||||
/*===============*/
|
||||
/* out: number of fields */
|
||||
const ulint* offsets)/* in: array returned by rec_get_offsets() */
|
||||
{
|
||||
ulint n_fields;
|
||||
ut_ad(offsets);
|
||||
n_fields = offsets[1];
|
||||
ut_ad(n_fields > 0);
|
||||
ut_ad(n_fields <= REC_MAX_N_FIELDS);
|
||||
ut_ad(n_fields + REC_OFFS_HEADER_SIZE
|
||||
<= rec_offs_get_n_alloc(offsets));
|
||||
return(n_fields);
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
Validates offsets returned by rec_get_offsets(). */
|
||||
UNIV_INLINE
|
||||
|
@ -1202,25 +1221,6 @@ rec_get_data_size_old(
|
|||
return(rec_get_field_start_offs(rec, rec_get_n_fields_old(rec)));
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
The following function returns the number of fields in a record. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
rec_offs_n_fields(
|
||||
/*===============*/
|
||||
/* out: number of fields */
|
||||
const ulint* offsets)/* in: array returned by rec_get_offsets() */
|
||||
{
|
||||
ulint n_fields;
|
||||
ut_ad(offsets);
|
||||
n_fields = offsets[1];
|
||||
ut_ad(n_fields > 0);
|
||||
ut_ad(n_fields <= REC_MAX_N_FIELDS);
|
||||
ut_ad(n_fields + REC_OFFS_HEADER_SIZE
|
||||
<= rec_offs_get_n_alloc(offsets));
|
||||
return(n_fields);
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
The following function sets the number of fields in offsets. */
|
||||
UNIV_INLINE
|
||||
|
|
Loading…
Add table
Reference in a new issue