if (UNIV_UNLIKELY(!memcmp(field_ref_zero,
field + f_len - BTR_EXTERN_FIELD_REF_SIZE,
BTR_EXTERN_FIELD_REF_SIZE))) { /* The BLOB pointer is not set: we cannot fetch it */
ext->len[i] = 0;
} else { if (ext->max_len == REC_VERSION_56_MAX_INDEX_COL_LEN
&& f_len > BTR_EXTERN_FIELD_REF_SIZE) { /* In this case, the field is in B format or beyond, (refertothedefinitionofrow_ext_t.max_len) andthefieldisalreadyfillwithprefix,otherwise f_lenwouldbeBTR_EXTERN_FIELD_REF_SIZE. Sothereisnoneedtore-readtheprefixexternally, butjustcopythelocalprefixtobuf.Pleasenote iftheext->len[i]iszero,itmeansanerror
as above. */
memcpy(buf, field, f_len - BTR_EXTERN_FIELD_REF_SIZE);
ext->len[i] = f_len - BTR_EXTERN_FIELD_REF_SIZE;
} else { /* Fetch at most ext->max_len of the column. Thecolumnshouldbenon-empty.However, trx_rollback_all_recovered()maytryto accessahalf-deletedBLOBiftheserverpreviously crashedduringtheexecutionof
btr_free_externally_stored_field(). */
ext->len[i] = btr_copy_externally_stored_field_prefix(
buf, ext->max_len, ext->zip_size,
field, f_len);
}
}
}
/********************************************************************//**
Creates a cache of column prefixes of externally stored columns.
@return own: column prefix cache */
row_ext_t*
row_ext_create( /*===========*/
ulint n_ext, /*!< in: number of externally stored columns */ const ulint* ext, /*!< in: col_no's of externally stored columns intheInnoDBtableobject,asreportedby dict_col_get_no();NOTrelativetotherecords
in the clustered index */ const dict_table_t& table, /*!< in: table */ const dtuple_t* tuple, /*!< in: data tuple containing the field referencesoftheexternallystored columns;mustbeindexedbycol_no; theclusteredindexrecordmustbe coveredbyalockorapagelatch
to prevent deletion (rollback or purge). */
mem_heap_t* heap) /*!< in: heap where created */
{ if (!table.space) { return NULL;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.