Drizzled Public API Documentation

row0ext.h File Reference
#include "univ.i"
#include "row0types.h"
#include "data0types.h"
#include "mem0mem.h"
#include "row0ext.ic"

Go to the source code of this file.

Classes

struct  row_ext_struct

Functions

UNIV_INTERN row_ext_trow_ext_create (ulint n_ext, const ulint *ext, const dtuple_t *tuple, ulint zip_size, mem_heap_t *heap)
UNIV_INLINE const byte * row_ext_lookup_ith (const row_ext_t *ext, ulint i, ulint *len)
UNIV_INLINE const byte * row_ext_lookup (const row_ext_t *ext, ulint col, ulint *len)

Detailed Description

Caching of externally stored column prefixes

Created September 2006 Marko Makela

Definition in file row0ext.h.


Function Documentation

UNIV_INTERN row_ext_t* row_ext_create ( ulint  n_ext,
const ulint *  ext,
const dtuple_t tuple,
ulint  zip_size,
mem_heap_t heap 
)

Creates a cache of column prefixes of externally stored columns.

Returns:
own: column prefix cache in: heap where created

Creates a cache of column prefixes of externally stored columns.

Returns:
own: column prefix cache
Parameters:
n_extin: number of externally stored columns
extin: col_no's of externally stored columns in the InnoDB table object, as reported by dict_col_get_no(); NOT relative to the records in the clustered index
tuplein: data tuple containing the field references of the externally stored columns; must be indexed by col_no; the clustered index record must be covered by a lock or a page latch to prevent deletion (rollback or purge).
zip_sizecompressed page size in bytes, or 0
heapin: heap where created

Definition at line 75 of file row0ext.cc.

References row_ext_struct::buf, row_ext_struct::ext, row_ext_struct::len, mem_heap_alloc(), row_ext_struct::n_ext, row_ext_create(), ut_ad, and ut_is_2pow.

Referenced by row_build(), row_ext_create(), and row_upd_replace().

UNIV_INLINE const byte* row_ext_lookup ( const row_ext_t ext,
ulint  col,
ulint *  len 
)

Looks up a column prefix of an externally stored column.

Returns:
column prefix, or NULL if the column is not stored externally, or pointer to field_ref_zero if the BLOB pointer is unset out: length of prefix, in bytes, at most REC_MAX_INDEX_COL_LEN
Parameters:
extin: column prefix cache
colin: column number in the InnoDB table object, as reported by dict_col_get_no(); NOT relative to the records in the clustered index

Referenced by row_build_index_entry().

UNIV_INLINE const byte* row_ext_lookup_ith ( const row_ext_t ext,
ulint  i,
ulint *  len 
)

Looks up a column prefix of an externally stored column.

Returns:
column prefix, or NULL if the column is not stored externally, or pointer to field_ref_zero if the BLOB pointer is unset out: length of prefix, in bytes, at most REC_MAX_INDEX_COL_LEN
Parameters:
extin/out: column prefix cache
iin: index of ext->ext[]