Commit 91d12b08 authored by Marko Mäkelä's avatar Marko Mäkelä

s/COLUMNS_INSTANT/INSTANT

parent ab609d3a
...@@ -652,7 +652,7 @@ btr_cur_instant_init_low(dict_index_t* index, mtr_t* mtr) ...@@ -652,7 +652,7 @@ btr_cur_instant_init_low(dict_index_t* index, mtr_t* mtr)
if (dict_table_is_comp(index->table)) { if (dict_table_is_comp(index->table)) {
if (rec_get_info_bits(rec, true) != REC_INFO_MIN_REC_FLAG if (rec_get_info_bits(rec, true) != REC_INFO_MIN_REC_FLAG
&& rec_get_status(rec) != REC_STATUS_COLUMNS_INSTANT) { && rec_get_status(rec) != REC_STATUS_INSTANT) {
incompatible: incompatible:
ib::error() << "Table " << index->table->name ib::error() << "Table " << index->table->name
<< " contains unrecognizable " << " contains unrecognizable "
......
...@@ -67,19 +67,19 @@ enum rec_comp_status_t { ...@@ -67,19 +67,19 @@ enum rec_comp_status_t {
REC_STATUS_SUPREMUM = 3, REC_STATUS_SUPREMUM = 3,
/** Clustered index record that has been inserted or updated /** Clustered index record that has been inserted or updated
after instant ADD COLUMN (more than dict_index_t::n_core_fields) */ after instant ADD COLUMN (more than dict_index_t::n_core_fields) */
REC_STATUS_COLUMNS_INSTANT = 4 REC_STATUS_INSTANT = 4
}; };
/** The dtuple_t::info_bits of the 'default row' record. /** The dtuple_t::info_bits of the 'default row' record.
@see rec_is_default_row() */ @see rec_is_default_row() */
static const byte REC_INFO_DEFAULT_ROW static const byte REC_INFO_DEFAULT_ROW
= REC_INFO_MIN_REC_FLAG | REC_STATUS_COLUMNS_INSTANT; = REC_INFO_MIN_REC_FLAG | REC_STATUS_INSTANT;
/** The dtuple_t::info_bits of the 'default row' record with dropped /** The dtuple_t::info_bits of the 'default row' record with dropped
column information. */ column information. */
static const byte REC_INFO_DEFAULT_ROW_DROP static const byte REC_INFO_DEFAULT_ROW_DROP
= REC_INFO_MIN_REC_FLAG | REC_INFO_DELETED_FLAG = REC_INFO_MIN_REC_FLAG | REC_INFO_DELETED_FLAG
| REC_STATUS_COLUMNS_INSTANT; | REC_STATUS_INSTANT;
#define REC_NEW_STATUS 3 /* This is single byte bit-field */ #define REC_NEW_STATUS 3 /* This is single byte bit-field */
#define REC_NEW_STATUS_MASK 0x7UL #define REC_NEW_STATUS_MASK 0x7UL
...@@ -308,7 +308,7 @@ rec_comp_status_t ...@@ -308,7 +308,7 @@ rec_comp_status_t
rec_get_status(const rec_t* rec) rec_get_status(const rec_t* rec)
{ {
byte bits = rec[-REC_NEW_STATUS] & REC_NEW_STATUS_MASK; byte bits = rec[-REC_NEW_STATUS] & REC_NEW_STATUS_MASK;
ut_ad(bits <= REC_STATUS_COLUMNS_INSTANT); ut_ad(bits <= REC_STATUS_INSTANT);
return static_cast<rec_comp_status_t>(bits); return static_cast<rec_comp_status_t>(bits);
} }
...@@ -319,12 +319,12 @@ inline ...@@ -319,12 +319,12 @@ inline
void void
rec_set_status(rec_t* rec, byte bits) rec_set_status(rec_t* rec, byte bits)
{ {
ut_ad(bits <= REC_STATUS_COLUMNS_INSTANT); ut_ad(bits <= REC_STATUS_INSTANT);
rec[-REC_NEW_STATUS] = (rec[-REC_NEW_STATUS] & ~REC_NEW_STATUS_MASK) rec[-REC_NEW_STATUS] = (rec[-REC_NEW_STATUS] & ~REC_NEW_STATUS_MASK)
| bits; | bits;
} }
/** Get the length of added field count in a REC_STATUS_COLUMNS_INSTANT record. /** Get the length of added field count in a REC_STATUS_INSTANT record.
@param[in] n_add_field number of added fields, minus one @param[in] n_add_field number of added fields, minus one
@return storage size of the field count, in bytes */ @return storage size of the field count, in bytes */
inline unsigned rec_get_n_add_field_len(ulint n_add_field) inline unsigned rec_get_n_add_field_len(ulint n_add_field)
...@@ -333,8 +333,8 @@ inline unsigned rec_get_n_add_field_len(ulint n_add_field) ...@@ -333,8 +333,8 @@ inline unsigned rec_get_n_add_field_len(ulint n_add_field)
return n_add_field < 0x80 ? 1 : 2; return n_add_field < 0x80 ? 1 : 2;
} }
/** Set the added field count in a REC_STATUS_COLUMNS_INSTANT record. /** Set the added field count in a REC_STATUS_INSTANT record.
@param[in,out] header variable header of a REC_STATUS_COLUMNS_INSTANT record @param[in,out] header variable header of a REC_STATUS_INSTANT record
@param[in] n_add number of added fields, minus 1 @param[in] n_add number of added fields, minus 1
@return record header before the number of added fields */ @return record header before the number of added fields */
inline void rec_set_n_add_field(byte*& header, ulint n_add) inline void rec_set_n_add_field(byte*& header, ulint n_add)
...@@ -830,7 +830,7 @@ rec_is_default_row(const rec_t* rec, const dict_index_t* index) ...@@ -830,7 +830,7 @@ rec_is_default_row(const rec_t* rec, const dict_index_t* index)
& REC_INFO_MIN_REC_FLAG; & REC_INFO_MIN_REC_FLAG;
ut_ad(!is || index->is_instant()); ut_ad(!is || index->is_instant());
ut_ad(!is || !dict_table_is_comp(index->table) ut_ad(!is || !dict_table_is_comp(index->table)
|| rec_get_status(rec) == REC_STATUS_COLUMNS_INSTANT); || rec_get_status(rec) == REC_STATUS_INSTANT);
return is; return is;
} }
...@@ -848,7 +848,7 @@ rec_is_new_default_row(const rec_t* rec, const dict_index_t* index) ...@@ -848,7 +848,7 @@ rec_is_new_default_row(const rec_t* rec, const dict_index_t* index)
is = is && rec_get_deleted_flag(rec, dict_table_is_comp(index->table)); is = is && rec_get_deleted_flag(rec, dict_table_is_comp(index->table));
ut_ad(!is || index->is_instant()); ut_ad(!is || index->is_instant());
ut_ad(!is || !dict_table_is_comp(index->table) ut_ad(!is || !dict_table_is_comp(index->table)
|| rec_get_status(rec) == REC_STATUS_COLUMNS_INSTANT); || rec_get_status(rec) == REC_STATUS_INSTANT);
return is; return is;
} }
...@@ -1045,7 +1045,7 @@ rec_copy( ...@@ -1045,7 +1045,7 @@ rec_copy(
@param[in] fields data fields @param[in] fields data fields
@param[in] n_fields number of data fields @param[in] n_fields number of data fields
@param[out] extra record header size @param[out] extra record header size
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_INSTANT @param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT
@return total size, in bytes */ @return total size, in bytes */
ulint ulint
rec_get_converted_size_temp( rec_get_converted_size_temp(
...@@ -1062,7 +1062,7 @@ rec_get_converted_size_temp( ...@@ -1062,7 +1062,7 @@ rec_get_converted_size_temp(
@param[in,out] offsets offsets to the fields; in: rec_offs_n_fields(offsets) @param[in,out] offsets offsets to the fields; in: rec_offs_n_fields(offsets)
@param[in] n_core number of core fields (index->n_core_fields) @param[in] n_core number of core fields (index->n_core_fields)
@param[in] def_val default values for non-core fields @param[in] def_val default values for non-core fields
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_INSTANT */ @param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT */
void void
rec_init_offsets_temp( rec_init_offsets_temp(
const rec_t* rec, const rec_t* rec,
...@@ -1089,7 +1089,7 @@ rec_init_offsets_temp( ...@@ -1089,7 +1089,7 @@ rec_init_offsets_temp(
@param[in] index clustered or secondary index @param[in] index clustered or secondary index
@param[in] fields data fields @param[in] fields data fields
@param[in] n_fields number of data fields @param[in] n_fields number of data fields
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_INSTANT */ @param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT */
void void
rec_convert_dtuple_to_temp( rec_convert_dtuple_to_temp(
rec_t* rec, rec_t* rec,
......
...@@ -67,7 +67,7 @@ most significant bytes and bits are written below less significant. ...@@ -67,7 +67,7 @@ most significant bytes and bits are written below less significant.
001=REC_STATUS_NODE_PTR 001=REC_STATUS_NODE_PTR
010=REC_STATUS_INFIMUM 010=REC_STATUS_INFIMUM
011=REC_STATUS_SUPREMUM 011=REC_STATUS_SUPREMUM
100=REC_STATUS_COLUMNS_INSTANT 100=REC_STATUS_INSTANT
1xx=reserved 1xx=reserved
5 bits heap number 5 bits heap number
4 8 bits heap number 4 8 bits heap number
...@@ -453,7 +453,7 @@ rec_get_n_fields( ...@@ -453,7 +453,7 @@ rec_get_n_fields(
} }
switch (rec_get_status(rec)) { switch (rec_get_status(rec)) {
case REC_STATUS_COLUMNS_INSTANT: case REC_STATUS_INSTANT:
case REC_STATUS_ORDINARY: case REC_STATUS_ORDINARY:
return(dict_index_get_n_fields(index)); return(dict_index_get_n_fields(index));
case REC_STATUS_NODE_PTR: case REC_STATUS_NODE_PTR:
......
...@@ -1370,7 +1370,7 @@ page_cur_insert_rec_low( ...@@ -1370,7 +1370,7 @@ page_cur_insert_rec_low(
switch (rec_get_status(current_rec)) { switch (rec_get_status(current_rec)) {
case REC_STATUS_ORDINARY: case REC_STATUS_ORDINARY:
case REC_STATUS_NODE_PTR: case REC_STATUS_NODE_PTR:
case REC_STATUS_COLUMNS_INSTANT: case REC_STATUS_INSTANT:
case REC_STATUS_INFIMUM: case REC_STATUS_INFIMUM:
break; break;
case REC_STATUS_SUPREMUM: case REC_STATUS_SUPREMUM:
...@@ -1379,7 +1379,7 @@ page_cur_insert_rec_low( ...@@ -1379,7 +1379,7 @@ page_cur_insert_rec_low(
switch (rec_get_status(insert_rec)) { switch (rec_get_status(insert_rec)) {
case REC_STATUS_ORDINARY: case REC_STATUS_ORDINARY:
case REC_STATUS_NODE_PTR: case REC_STATUS_NODE_PTR:
case REC_STATUS_COLUMNS_INSTANT: case REC_STATUS_INSTANT:
break; break;
case REC_STATUS_INFIMUM: case REC_STATUS_INFIMUM:
case REC_STATUS_SUPREMUM: case REC_STATUS_SUPREMUM:
......
...@@ -176,7 +176,7 @@ rec_get_n_extern_new( ...@@ -176,7 +176,7 @@ rec_get_n_extern_new(
ut_ad(!index->table->supports_instant() || index->is_dummy); ut_ad(!index->table->supports_instant() || index->is_dummy);
ut_ad(!index->is_instant()); ut_ad(!index->is_instant());
ut_ad(rec_get_status(rec) == REC_STATUS_ORDINARY ut_ad(rec_get_status(rec) == REC_STATUS_ORDINARY
|| rec_get_status(rec) == REC_STATUS_COLUMNS_INSTANT); || rec_get_status(rec) == REC_STATUS_INSTANT);
ut_ad(n == ULINT_UNDEFINED || n <= dict_index_get_n_fields(index)); ut_ad(n == ULINT_UNDEFINED || n <= dict_index_get_n_fields(index));
if (n == ULINT_UNDEFINED) { if (n == ULINT_UNDEFINED) {
...@@ -238,8 +238,8 @@ rec_get_n_extern_new( ...@@ -238,8 +238,8 @@ rec_get_n_extern_new(
return(n_extern); return(n_extern);
} }
/** Get the added field count in a REC_STATUS_COLUMNS_INSTANT record. /** Get the added field count in a REC_STATUS_INSTANT record.
@param[in,out] header variable header of a REC_STATUS_COLUMNS_INSTANT record @param[in,out] header variable header of a REC_STATUS_INSTANT record
@return number of added fields */ @return number of added fields */
static inline unsigned rec_get_n_add_field(const byte*& header) static inline unsigned rec_get_n_add_field(const byte*& header)
{ {
...@@ -261,12 +261,12 @@ enum rec_leaf_format { ...@@ -261,12 +261,12 @@ enum rec_leaf_format {
/** Temporary file record */ /** Temporary file record */
REC_LEAF_TEMP, REC_LEAF_TEMP,
/** Temporary file record, with added columns /** Temporary file record, with added columns
(REC_STATUS_COLUMNS_INSTANT) */ (REC_STATUS_INSTANT) */
REC_LEAF_TEMP_COLUMNS_ADDED, REC_LEAF_TEMP_COLUMNS_ADDED,
/** Normal (REC_STATUS_ORDINARY) */ /** Normal (REC_STATUS_ORDINARY) */
REC_LEAF_ORDINARY, REC_LEAF_ORDINARY,
/** With add or drop columns (REC_STATUS_COLUMNS_INSTANT) */ /** With add or drop columns (REC_STATUS_INSTANT) */
REC_LEAF_COLUMNS_INSTANT REC_LEAF_INSTANT
}; };
/** Determine the offset to each field in a leaf-page record /** Determine the offset to each field in a leaf-page record
...@@ -322,7 +322,7 @@ rec_init_offsets_comp_ordinary( ...@@ -322,7 +322,7 @@ rec_init_offsets_comp_ordinary(
ut_d(n_null = std::min(index->n_core_null_bytes * 8U, ut_d(n_null = std::min(index->n_core_null_bytes * 8U,
index->n_nullable)); index->n_nullable));
break; break;
case REC_LEAF_COLUMNS_INSTANT: case REC_LEAF_INSTANT:
/* We would have !index->is_instant() when rolling back /* We would have !index->is_instant() when rolling back
an instant ADD COLUMN operation. */ an instant ADD COLUMN operation. */
nulls -= REC_N_NEW_EXTRA_BYTES; nulls -= REC_N_NEW_EXTRA_BYTES;
...@@ -552,7 +552,7 @@ rec_offs_validate( ...@@ -552,7 +552,7 @@ rec_offs_validate(
dict_index_get_n_unique_in_tree(index) + 1); dict_index_get_n_unique_in_tree(index) + 1);
if (comp && rec) { if (comp && rec) {
switch (rec_get_status(rec)) { switch (rec_get_status(rec)) {
case REC_STATUS_COLUMNS_INSTANT: case REC_STATUS_INSTANT:
case REC_STATUS_ORDINARY: case REC_STATUS_ORDINARY:
break; break;
case REC_STATUS_NODE_PTR: case REC_STATUS_NODE_PTR:
...@@ -857,12 +857,12 @@ rec_init_offsets( ...@@ -857,12 +857,12 @@ rec_init_offsets(
= dict_index_get_n_unique_in_tree_nonleaf( = dict_index_get_n_unique_in_tree_nonleaf(
index); index);
break; break;
case REC_STATUS_COLUMNS_INSTANT: case REC_STATUS_INSTANT:
ut_ad(leaf); ut_ad(leaf);
rec_init_offsets_comp_ordinary(rec, index, offsets, rec_init_offsets_comp_ordinary(rec, index, offsets,
index->n_core_fields, index->n_core_fields,
NULL, NULL,
REC_LEAF_COLUMNS_INSTANT); REC_LEAF_INSTANT);
return; return;
case REC_STATUS_ORDINARY: case REC_STATUS_ORDINARY:
ut_ad(leaf); ut_ad(leaf);
...@@ -1048,7 +1048,7 @@ rec_get_offsets_func( ...@@ -1048,7 +1048,7 @@ rec_get_offsets_func(
if (dict_table_is_comp(index->table)) { if (dict_table_is_comp(index->table)) {
switch (UNIV_EXPECT(rec_get_status(rec), switch (UNIV_EXPECT(rec_get_status(rec),
REC_STATUS_ORDINARY)) { REC_STATUS_ORDINARY)) {
case REC_STATUS_COLUMNS_INSTANT: case REC_STATUS_INSTANT:
if (UNIV_UNLIKELY(rec_get_info_bits(rec, true) if (UNIV_UNLIKELY(rec_get_info_bits(rec, true)
== (REC_INFO_MIN_REC_FLAG == (REC_INFO_MIN_REC_FLAG
...@@ -1431,9 +1431,9 @@ rec_get_converted_size_comp_prefix_low( ...@@ -1431,9 +1431,9 @@ rec_get_converted_size_comp_prefix_low(
ut_ad(n_fields <= dict_index_get_n_fields(index)); ut_ad(n_fields <= dict_index_get_n_fields(index));
ut_d(ulint n_null = index->n_nullable); ut_d(ulint n_null = index->n_nullable);
ut_ad(status == REC_STATUS_ORDINARY || status == REC_STATUS_NODE_PTR ut_ad(status == REC_STATUS_ORDINARY || status == REC_STATUS_NODE_PTR
|| status == REC_STATUS_COLUMNS_INSTANT); || status == REC_STATUS_INSTANT);
if (status == REC_STATUS_COLUMNS_INSTANT if (status == REC_STATUS_INSTANT
&& (!temp || n_fields > index->n_core_fields)) { && (!temp || n_fields > index->n_core_fields)) {
ut_ad(index->is_instant()); ut_ad(index->is_instant());
ut_ad(UT_BITS_IN_BYTES(n_null) >= index->n_core_null_bytes); ut_ad(UT_BITS_IN_BYTES(n_null) >= index->n_core_null_bytes);
...@@ -1599,10 +1599,10 @@ rec_get_converted_size_comp( ...@@ -1599,10 +1599,10 @@ rec_get_converted_size_comp(
case REC_STATUS_ORDINARY: case REC_STATUS_ORDINARY:
if (n_fields > index->n_core_fields) { if (n_fields > index->n_core_fields) {
ut_ad(index->is_instant()); ut_ad(index->is_instant());
status = REC_STATUS_COLUMNS_INSTANT; status = REC_STATUS_INSTANT;
} }
/* fall through */ /* fall through */
case REC_STATUS_COLUMNS_INSTANT: case REC_STATUS_INSTANT:
ut_ad(n_fields >= index->n_core_fields); ut_ad(n_fields >= index->n_core_fields);
/** In case of default row with drop column info, there /** In case of default row with drop column info, there
is a possiblity of n_fields can be higher than is a possiblity of n_fields can be higher than
...@@ -1824,7 +1824,7 @@ rec_convert_dtuple_to_default_rec_comp( ...@@ -1824,7 +1824,7 @@ rec_convert_dtuple_to_default_rec_comp(
rec_set_heap_no_new(rec, PAGE_HEAP_NO_USER_LOW); rec_set_heap_no_new(rec, PAGE_HEAP_NO_USER_LOW);
rec_set_status(rec, REC_STATUS_COLUMNS_INSTANT); rec_set_status(rec, REC_STATUS_INSTANT);
lens = nulls - n_null_bytes; lens = nulls - n_null_bytes;
...@@ -1943,7 +1943,7 @@ rec_convert_dtuple_to_rec_comp( ...@@ -1943,7 +1943,7 @@ rec_convert_dtuple_to_rec_comp(
ut_d(ulint n_null = index->n_nullable); ut_d(ulint n_null = index->n_nullable);
switch (status) { switch (status) {
case REC_STATUS_COLUMNS_INSTANT: case REC_STATUS_INSTANT:
ut_ad(index->is_instant()); ut_ad(index->is_instant());
if (index->is_drop_field_exist()) { if (index->is_drop_field_exist()) {
...@@ -1963,7 +1963,7 @@ rec_convert_dtuple_to_rec_comp( ...@@ -1963,7 +1963,7 @@ rec_convert_dtuple_to_rec_comp(
rec_set_status( rec_set_status(
rec, n_fields == index->n_core_fields rec, n_fields == index->n_core_fields
? REC_STATUS_ORDINARY ? REC_STATUS_ORDINARY
: REC_STATUS_COLUMNS_INSTANT); : REC_STATUS_INSTANT);
} }
if (dict_table_is_comp(index->table)) { if (dict_table_is_comp(index->table)) {
...@@ -2113,7 +2113,7 @@ rec_convert_dtuple_to_rec_new( ...@@ -2113,7 +2113,7 @@ rec_convert_dtuple_to_rec_new(
if (status == REC_STATUS_ORDINARY if (status == REC_STATUS_ORDINARY
&& dtuple->n_fields > index->n_core_fields) { && dtuple->n_fields > index->n_core_fields) {
ut_ad(index->is_instant()); ut_ad(index->is_instant());
status = REC_STATUS_COLUMNS_INSTANT; status = REC_STATUS_INSTANT;
} }
ulint extra_size; ulint extra_size;
...@@ -2177,7 +2177,7 @@ rec_convert_dtuple_to_rec( ...@@ -2177,7 +2177,7 @@ rec_convert_dtuple_to_rec(
@param[in] fields data fields @param[in] fields data fields
@param[in] n_fields number of data fields @param[in] n_fields number of data fields
@param[out] extra record header size @param[out] extra record header size
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_INSTANT @param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT
@return total size, in bytes */ @return total size, in bytes */
ulint ulint
rec_get_converted_size_temp( rec_get_converted_size_temp(
...@@ -2197,7 +2197,7 @@ rec_get_converted_size_temp( ...@@ -2197,7 +2197,7 @@ rec_get_converted_size_temp(
@param[in,out] offsets offsets to the fields; in: rec_offs_n_fields(offsets) @param[in,out] offsets offsets to the fields; in: rec_offs_n_fields(offsets)
@param[in] n_core number of core fields (index->n_core_fields) @param[in] n_core number of core fields (index->n_core_fields)
@param[in] def_val default values for non-core fields @param[in] def_val default values for non-core fields
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_INSTANT */ @param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT */
void void
rec_init_offsets_temp( rec_init_offsets_temp(
const rec_t* rec, const rec_t* rec,
...@@ -2208,13 +2208,13 @@ rec_init_offsets_temp( ...@@ -2208,13 +2208,13 @@ rec_init_offsets_temp(
rec_comp_status_t status) rec_comp_status_t status)
{ {
ut_ad(status == REC_STATUS_ORDINARY ut_ad(status == REC_STATUS_ORDINARY
|| status == REC_STATUS_COLUMNS_INSTANT); || status == REC_STATUS_INSTANT);
/* The table may have been converted to plain format /* The table may have been converted to plain format
if it was emptied during an ALTER TABLE operation. */ if it was emptied during an ALTER TABLE operation. */
ut_ad(index->n_core_fields == n_core || !index->is_instant()); ut_ad(index->n_core_fields == n_core || !index->is_instant());
ut_ad(index->n_core_fields >= n_core); ut_ad(index->n_core_fields >= n_core);
rec_init_offsets_comp_ordinary(rec, index, offsets, n_core, def_val, rec_init_offsets_comp_ordinary(rec, index, offsets, n_core, def_val,
status == REC_STATUS_COLUMNS_INSTANT status == REC_STATUS_INSTANT
? REC_LEAF_TEMP_COLUMNS_ADDED ? REC_LEAF_TEMP_COLUMNS_ADDED
: REC_LEAF_TEMP); : REC_LEAF_TEMP);
} }
...@@ -2241,7 +2241,7 @@ rec_init_offsets_temp( ...@@ -2241,7 +2241,7 @@ rec_init_offsets_temp(
@param[in] index clustered or secondary index @param[in] index clustered or secondary index
@param[in] fields data fields @param[in] fields data fields
@param[in] n_fields number of data fields @param[in] n_fields number of data fields
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_INSTANT @param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT
*/ */
void void
rec_convert_dtuple_to_temp( rec_convert_dtuple_to_temp(
...@@ -2411,7 +2411,7 @@ rec_copy_prefix_to_buf( ...@@ -2411,7 +2411,7 @@ rec_copy_prefix_to_buf(
ut_ad(n_fields ut_ad(n_fields
<= dict_index_get_n_unique_in_tree_nonleaf(index)); <= dict_index_get_n_unique_in_tree_nonleaf(index));
break; break;
case REC_STATUS_COLUMNS_INSTANT: case REC_STATUS_INSTANT:
/* We would have !index->is_instant() when rolling back /* We would have !index->is_instant() when rolling back
an instant ADD COLUMN operation. */ an instant ADD COLUMN operation. */
ut_ad(index->is_instant() || page_rec_is_default_row(rec)); ut_ad(index->is_instant() || page_rec_is_default_row(rec));
...@@ -2526,7 +2526,7 @@ rec_copy_prefix_to_buf( ...@@ -2526,7 +2526,7 @@ rec_copy_prefix_to_buf(
/* copy the fixed-size header and the record prefix */ /* copy the fixed-size header and the record prefix */
memcpy(b - REC_N_NEW_EXTRA_BYTES, rec - REC_N_NEW_EXTRA_BYTES, memcpy(b - REC_N_NEW_EXTRA_BYTES, rec - REC_N_NEW_EXTRA_BYTES,
prefix_len + REC_N_NEW_EXTRA_BYTES); prefix_len + REC_N_NEW_EXTRA_BYTES);
ut_ad(rec_get_status(b) == REC_STATUS_COLUMNS_INSTANT); ut_ad(rec_get_status(b) == REC_STATUS_INSTANT);
rec_set_status(b, REC_STATUS_ORDINARY); rec_set_status(b, REC_STATUS_ORDINARY);
return b; return b;
} else { } else {
......
...@@ -851,7 +851,7 @@ row_log_table_low_redundant( ...@@ -851,7 +851,7 @@ row_log_table_low_redundant(
const bool is_instant = index->online_log->is_instant(index); const bool is_instant = index->online_log->is_instant(index);
rec_comp_status_t status = is_instant rec_comp_status_t status = is_instant
? REC_STATUS_COLUMNS_INSTANT : REC_STATUS_ORDINARY; ? REC_STATUS_INSTANT : REC_STATUS_ORDINARY;
size = rec_get_converted_size_temp( size = rec_get_converted_size_temp(
index, tuple->fields, tuple->n_fields, &extra_size, status); index, tuple->fields, tuple->n_fields, &extra_size, status);
...@@ -905,7 +905,7 @@ row_log_table_low_redundant( ...@@ -905,7 +905,7 @@ row_log_table_low_redundant(
*b++ = static_cast<byte>(extra_size); *b++ = static_cast<byte>(extra_size);
} }
if (status == REC_STATUS_COLUMNS_INSTANT) { if (status == REC_STATUS_INSTANT) {
ut_ad(is_instant); ut_ad(is_instant);
if (n_fields <= index->online_log->n_core_fields) { if (n_fields <= index->online_log->n_core_fields) {
status = REC_STATUS_ORDINARY; status = REC_STATUS_ORDINARY;
...@@ -993,7 +993,7 @@ row_log_table_low( ...@@ -993,7 +993,7 @@ row_log_table_low(
ut_ad(page_is_comp(page_align(rec))); ut_ad(page_is_comp(page_align(rec)));
ut_ad(rec_get_status(rec) == REC_STATUS_ORDINARY ut_ad(rec_get_status(rec) == REC_STATUS_ORDINARY
|| rec_get_status(rec) == REC_STATUS_COLUMNS_INSTANT); || rec_get_status(rec) == REC_STATUS_INSTANT);
const ulint omit_size = REC_N_NEW_EXTRA_BYTES; const ulint omit_size = REC_N_NEW_EXTRA_BYTES;
...@@ -1067,7 +1067,7 @@ row_log_table_low( ...@@ -1067,7 +1067,7 @@ row_log_table_low(
if (is_instant) { if (is_instant) {
*b++ = fake_extra_size *b++ = fake_extra_size
? REC_STATUS_COLUMNS_INSTANT ? REC_STATUS_INSTANT
: rec_get_status(rec); : rec_get_status(rec);
} else { } else {
ut_ad(rec_get_status(rec) == REC_STATUS_ORDINARY); ut_ad(rec_get_status(rec) == REC_STATUS_ORDINARY);
......
...@@ -682,7 +682,7 @@ row_upd_rec_in_place( ...@@ -682,7 +682,7 @@ row_upd_rec_in_place(
switch (rec_get_status(rec)) { switch (rec_get_status(rec)) {
case REC_STATUS_ORDINARY: case REC_STATUS_ORDINARY:
break; break;
case REC_STATUS_COLUMNS_INSTANT: case REC_STATUS_INSTANT:
ut_ad(index->is_instant()); ut_ad(index->is_instant());
break; break;
case REC_STATUS_NODE_PTR: case REC_STATUS_NODE_PTR:
......
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