summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <yuchen.pei@mariadb.com>2023-03-30 10:25:02 +1100
committerYuchen Pei <yuchen.pei@mariadb.com>2023-03-30 10:25:02 +1100
commit44558f70c7cf246dc939b388b0fb786f3fb8c6ec (patch)
tree3dfec7337d0a5e1d85951e6c5c86e6fc4c7e0740
parent9f42f16efe64bb2084c800e393b8233bd162e9eb (diff)
downloadmariadb-git-bb-11.1-mdev-26137.tar.gz
separated out changes to handle_instant_metadata() from 9501981cbb-11.1-mdev-26137
-rw-r--r--storage/innobase/row/row0import.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc
index 00e8aae52e0..9c68cb3ab92 100644
--- a/storage/innobase/row/row0import.cc
+++ b/storage/innobase/row/row0import.cc
@@ -3117,10 +3117,8 @@ static dberr_t handle_instant_metadata(dict_table_t *table,
}
if (!cfg.m_missing)
- {
if (dberr_t err= cfg.match_flags(current_thd))
return err;
- }
const unsigned zip_size= fil_space_t::zip_size(space_flags);
const unsigned physical_size= zip_size ? zip_size : unsigned(srv_page_size);
@@ -3314,10 +3312,7 @@ static dberr_t handle_instant_metadata(dict_table_t *table,
rec_offs *offsets= rec_get_offsets(
rec, index, nullptr, index->n_core_fields, ULINT_UNDEFINED, &heap);
if (rec_offs_any_default(offsets))
- {
- inconsistent:
goto incompatible;
- }
/* In fact, because we only ever append fields to the metadata
record, it is also OK to perform READ UNCOMMITTED and
@@ -3327,7 +3322,7 @@ static dberr_t handle_instant_metadata(dict_table_t *table,
ulint(index->n_fields) + !!index->table->instant &&
!trx_sys.is_registered(current_trx(),
row_get_rec_trx_id(rec, index, offsets)))
- goto inconsistent;
+ goto incompatible;
for (unsigned i= index->n_core_fields; i < index->n_fields; i++)
{
@@ -3351,15 +3346,10 @@ static dberr_t handle_instant_metadata(dict_table_t *table,
else if (len < BTR_EXTERN_FIELD_REF_SIZE ||
!memcmp(data + len - BTR_EXTERN_FIELD_REF_SIZE, field_ref_zero,
BTR_EXTERN_FIELD_REF_SIZE))
- {
- col->def_val.len= UNIV_SQL_DEFAULT;
- goto inconsistent;
- }
+ goto incompatible;
else
- {
col->def_val.data= btr_copy_externally_stored_field(
&col->def_val.len, data, srv_page_size, len, index->table->heap);
- }
}
}