Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä 2020-05-05 20:33:10 +03:00
commit 2c3c851d2c
165 changed files with 4213 additions and 3470 deletions

View file

@ -852,13 +852,13 @@ UNIV_INLINE
void
rec_offs_set_n_alloc(
/*=================*/
offset_t*offsets, /*!< out: array for rec_get_offsets(),
rec_offs*offsets, /*!< out: array for rec_get_offsets(),
must be allocated */
ulint n_alloc) /*!< in: number of elements */
{
ut_ad(n_alloc > REC_OFFS_HEADER_SIZE);
UNIV_MEM_ALLOC(offsets, n_alloc * sizeof *offsets);
offsets[0] = static_cast<offset_t>(n_alloc);
offsets[0] = static_cast<rec_offs>(n_alloc);
}
/************************************************************//**
@ -866,18 +866,18 @@ The following function is used to get an offset to the nth
data field in a record.
@return offset from the origin of rec */
UNIV_INLINE
offset_t
rec_offs
rec_get_nth_field_offs(
/*===================*/
const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */
const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */
ulint n, /*!< in: index of the field */
ulint* len) /*!< out: length of the field; UNIV_SQL_NULL
if SQL null; UNIV_SQL_DEFAULT is default value */
{
ut_ad(n < rec_offs_n_fields(offsets));
offset_t offs = n == 0 ? 0 : get_value(rec_offs_base(offsets)[n]);
offset_t next_offs = rec_offs_base(offsets)[1 + n];
rec_offs offs = n == 0 ? 0 : get_value(rec_offs_base(offsets)[n]);
rec_offs next_offs = rec_offs_base(offsets)[1 + n];
if (get_type(next_offs) == SQL_NULL) {
*len = UNIV_SQL_NULL;
@ -898,7 +898,7 @@ const byte*
rec_offs_any_null_extern(
/*=====================*/
const rec_t* rec, /*!< in: record */
const offset_t* offsets) /*!< in: rec_get_offsets(rec) */
const rec_offs* offsets) /*!< in: rec_get_offsets(rec) */
{
ulint i;
ut_ad(rec_offs_validate(rec, NULL, offsets));
@ -933,7 +933,7 @@ UNIV_INLINE
ulint
rec_offs_nth_size(
/*==============*/
const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */
const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */
ulint n) /*!< in: nth field */
{
ut_ad(rec_offs_validate(NULL, NULL, offsets));
@ -952,7 +952,7 @@ UNIV_INLINE
ulint
rec_offs_n_extern(
/*==============*/
const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */
const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */
{
ulint n = 0;
@ -1150,7 +1150,7 @@ void
rec_set_nth_field(
/*==============*/
rec_t* rec, /*!< in: record */
const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */
const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */
ulint n, /*!< in: index number of the field */
const void* data, /*!< in: pointer to the data
if not SQL null */
@ -1206,7 +1206,7 @@ UNIV_INLINE
void
rec_offs_set_n_fields(
/*==================*/
offset_t* offsets, /*!< in/out: array returned by
rec_offs* offsets, /*!< in/out: array returned by
rec_get_offsets() */
ulint n_fields) /*!< in: number of fields */
{
@ -1215,7 +1215,7 @@ rec_offs_set_n_fields(
ut_ad(n_fields <= REC_MAX_N_FIELDS);
ut_ad(n_fields + REC_OFFS_HEADER_SIZE
<= rec_offs_get_n_alloc(offsets));
offsets[1] = static_cast<offset_t>(n_fields);
offsets[1] = static_cast<rec_offs>(n_fields);
}
/**********************************************************//**
@ -1228,7 +1228,7 @@ UNIV_INLINE
ulint
rec_offs_data_size(
/*===============*/
const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */
const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */
{
ulint size;
@ -1247,7 +1247,7 @@ UNIV_INLINE
ulint
rec_offs_extra_size(
/*================*/
const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */
const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */
{
ulint size;
ut_ad(rec_offs_validate(NULL, NULL, offsets));
@ -1263,7 +1263,7 @@ UNIV_INLINE
ulint
rec_offs_size(
/*==========*/
const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */
const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */
{
return(rec_offs_data_size(offsets) + rec_offs_extra_size(offsets));
}
@ -1277,7 +1277,7 @@ byte*
rec_get_end(
/*========*/
const rec_t* rec, /*!< in: pointer to record */
const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */
const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */
{
ut_ad(rec_offs_validate(rec, NULL, offsets));
return(const_cast<rec_t*>(rec + rec_offs_data_size(offsets)));
@ -1291,7 +1291,7 @@ byte*
rec_get_start(
/*==========*/
const rec_t* rec, /*!< in: pointer to record */
const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */
const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */
{
ut_ad(rec_offs_validate(rec, NULL, offsets));
return(const_cast<rec_t*>(rec - rec_offs_extra_size(offsets)));
@ -1308,7 +1308,7 @@ rec_t*
rec_copy(
void* buf,
const rec_t* rec,
const offset_t* offsets)
const rec_offs* offsets)
{
ulint extra_len;
ulint data_len;