1
/******************************************************
2
Caching of externally stored column prefixes
6
Created September 2006 Marko Makela
7
*******************************************************/
13
#include "row0types.h"
14
#include "data0types.h"
17
/************************************************************************
18
Creates a cache of column prefixes of externally stored columns. */
23
/* out,own: column prefix cache */
24
ulint n_ext, /* in: number of externally stored columns */
25
const ulint* ext, /* in: col_no's of externally stored columns
26
in the InnoDB table object, as reported by
27
dict_col_get_no(); NOT relative to the records
28
in the clustered index */
29
const dtuple_t* tuple, /* in: data tuple containing the field
30
references of the externally stored
31
columns; must be indexed by col_no;
32
the clustered index record must be
33
covered by a lock or a page latch
34
to prevent deletion (rollback or purge). */
35
ulint zip_size,/* compressed page size in bytes, or 0 */
36
mem_heap_t* heap); /* in: heap where created */
38
/************************************************************************
39
Looks up a column prefix of an externally stored column. */
44
/* out: column prefix, or NULL if
45
the column is not stored externally,
46
or pointer to field_ref_zero
47
if the BLOB pointer is unset */
48
const row_ext_t* ext, /* in/out: column prefix cache */
49
ulint i, /* in: index of ext->ext[] */
50
ulint* len); /* out: length of prefix, in bytes,
51
at most REC_MAX_INDEX_COL_LEN */
52
/************************************************************************
53
Looks up a column prefix of an externally stored column. */
58
/* out: column prefix, or NULL if
59
the column is not stored externally,
60
or pointer to field_ref_zero
61
if the BLOB pointer is unset */
62
const row_ext_t* ext, /* in: column prefix cache */
63
ulint col, /* in: column number in the InnoDB
64
table object, as reported by
65
dict_col_get_no(); NOT relative to the
66
records in the clustered index */
67
ulint* len); /* out: length of prefix, in bytes,
68
at most REC_MAX_INDEX_COL_LEN */
70
/* Prefixes of externally stored columns */
71
struct row_ext_struct{
72
ulint n_ext; /* number of externally stored columns */
73
const ulint* ext; /* col_no's of externally stored columns */
74
byte* buf; /* backing store of the column prefix cache */
75
ulint len[1]; /* prefix lengths; 0 if not cached */