131 return (next_os - os);
160 next_os = next_os & ~REC_1BYTE_SQL_NULL_MASK;
234 for (
size_t i = 0; i <
n; i++) {
290 info = info & ~REC_1BYTE_SQL_NULL_MASK;
303 info = info & ~REC_2BYTE_SQL_NULL_MASK;
351 uint32_t version_size = 0;
364 uint32_t version_size = 0;
378 uint32_t version_length = 0;
391 uint32_t version_length = 0;
static void data_write_sql_null(byte *data, ulint len)
Writes an SQL null field full of zeros.
static uint16_t mach_read_from_2(const byte *b)
The following function is used to fetch data from 2 consecutive bytes.
static void mach_write_to_2(byte *b, ulint n)
The following function is used to store data in two consecutive bytes.
static void mach_write_to_1(byte *b, ulint n)
The following function is used to store data in one byte.
static uint8_t mach_read_from_1(const byte *b)
The following function is used to fetch data from one byte.
constexpr uint32_t REC_OFFS_EXTERNAL
Definition: rec.h:75
constexpr uint32_t REC_OFFS_DEFAULT
Definition: rec.h:77
constexpr uint32_t REC_N_OLD_EXTRA_BYTES
Definition: rec.h:156
constexpr uint32_t REC_OFFS_DROP
Definition: rec.h:79
constexpr uint32_t REC_OFFS_MASK
Definition: rec.h:81
constexpr uint32_t REC_1BYTE_SQL_NULL_MASK
SQL null flag in a 1-byte offset of ROW_FORMAT=REDUNDANT records.
Definition: rec.h:191
static bool rec_offs_validate(const rec_t *rec, const dict_index_t *index, const ulint *offsets, const bool check_status=true)
Validates offsets returned by rec_get_offsets().
Definition: rec.h:568
constexpr uint32_t REC_OFFS_SQL_NULL
Definition: rec.h:73
static const ulint * rec_offs_base(const ulint *offsets)
Definition: rec.h:227
static uint16_t rec_get_n_fields_old_raw(const rec_t *rec)
The following function is used to get the number of fields in an old-style record,...
Definition: rec.h:350
constexpr uint32_t REC_2BYTE_SQL_NULL_MASK
SQL null flag in a 2-byte offset of ROW_FORMAT=REDUNDANT records.
Definition: rec.h:193
static bool rec_old_is_versioned(const rec_t *rec)
The following function tells if an old-style record is versioned.
Definition: rec.h:714
static bool rec_get_1byte_offs_flag(const rec_t *rec)
The following function is used to test whether the data offsets in the record are stored in one-byte ...
Definition: rec.h:1298
constexpr uint32_t REC_2BYTE_EXTERN_MASK
In a 2-byte offset of ROW_FORMAT=REDUNDANT records, the second most significant bit denotes that the ...
Definition: rec.h:197
static void rec_set_nth_field_null_bit_low(rec_t *rec, ulint i, bool val)
Sets the value of the ith field SQL null bit of an old-style record.
Definition: rem0lrec.h:280
static ulint rec_get_nth_field_offs_old_low(const rec_t *rec, ulint n, ulint *len)
The following function is used to get the offset to the nth data field in an old-style record.
Definition: rem0lrec.h:140
static ulint rec_2_get_field_start_offs_low(const rec_t *rec, ulint n)
Returns the offset of nth field start if the record is stored in the 2-byte offsets form.
Definition: rem0lrec.h:335
static ulint rec_offs_nth_sql_null_low(const ulint *offsets, ulint n)
Returns nonzero if the SQL NULL bit is set in nth field of rec.
Definition: rem0lrec.h:190
static void rec_set_nth_field_low(rec_t *rec, const ulint *offsets, ulint n, const void *data, ulint len)
This is used to modify the value of an already existing field in a record.
Definition: rem0lrec.h:224
static ulint rec_1_get_field_end_info_low(const rec_t *rec, ulint n)
Returns the offset of nth field end if the record is stored in the 1-byte offsets form.
Definition: rem0lrec.h:347
static ulint rec_1_get_field_start_offs_low(const rec_t *rec, ulint n)
Returns the offset of nth field start if the record is stored in the 1-byte offsets form.
Definition: rem0lrec.h:324
static ulint rec_offs_nth_default_low(const ulint *offsets, ulint n)
Returns nonzero if the default bit is set in nth field of rec.
Definition: rem0lrec.h:198
static void rec_set_nth_field_sql_null_low(rec_t *rec, ulint n)
Set nth field value to SQL NULL.
Definition: rem0lrec.h:270
static ulint rec_get_field_start_offs_low(const rec_t *rec, ulint n)
Read the offset of the start of a data field in the record.
Definition: rem0lrec.h:309
static void rec_2_set_field_end_info_low(rec_t *rec, ulint n, ulint info)
Sets the field end info for the nth field if the record is stored in the 2-byte format.
Definition: rem0lrec.h:386
static void rec_offs_make_nth_extern_low(ulint *offsets, const ulint n)
Mark the nth field as externally stored.
Definition: rem0lrec.h:185
static void rec_1_set_field_end_info_low(rec_t *rec, ulint n, ulint info)
Sets the field end info for the nth field if the record is stored in the 1-byte format.
Definition: rem0lrec.h:373
static ulint rec_get_nth_field_size_low(const rec_t *rec, ulint n)
Gets the physical size of an old-style field.
Definition: rem0lrec.h:122
static ulint rec_2_get_field_end_info_low(const rec_t *rec, ulint n)
Returns the offset of nth field end if the record is stored in the 2-byte offsets form.
Definition: rem0lrec.h:360
static ulint rec_offs_nth_size_low(const ulint *offsets, ulint n)
Gets the physical size of a field.
Definition: rem0lrec.h:206
static bool rec_offs_comp(const ulint *offsets)
Determine if the offsets are for a record in the new compact format.
static ulint rec_2_get_prev_field_end_info(const rec_t *rec, ulint n)
Returns the offset of n - 1th field end if the record is stored in the 2-byte offsets form.
Definition: rem0rec.ic:642
static ulint rec_1_get_prev_field_end_info(const rec_t *rec, ulint n)
Returns the offset of n - 1th field end if the record is stored in the 1-byte offsets form.
Definition: rem0rec.ic:623
byte rec_t
Definition: rem0types.h:41
const byte * rec_get_nth_field(const dict_index_t *index, const rec_t *rec, const ulint *offsets, ulint n, ulint *len)
Gets the value of the specified field in the record.
Definition: rem0wrec.h:108
#define UNIV_PAGE_SIZE
The universal page size of the database.
Definition: univ.i:294
constexpr uint32_t UNIV_SQL_NULL
The following number as the length of a logical field means that the field has the SQL NULL as its va...
Definition: univ.i:463
unsigned long int ulint
Definition: univ.i:406
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:105
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:93
static void * ut_memcpy(void *dest, const void *src, ulint n)
Wrapper for memcpy(3).
int n
Definition: xcom_base.cc:509