~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/row0ext.h

  • Committer: Brian Aker
  • Date: 2009-04-27 14:36:40 UTC
  • Revision ID: brian@gaz-20090427143640-f6zjmtt9vm55qgm2
Patch on show processlist from  davi@apache.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
12
 
13
13
You should have received a copy of the GNU General Public License along with
14
 
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15
 
St, Fifth Floor, Boston, MA 02110-1301 USA
 
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
15
Place, Suite 330, Boston, MA 02111-1307 USA
16
16
 
17
17
*****************************************************************************/
18
18
 
19
 
/**************************************************//**
20
 
@file include/row0ext.h
 
19
/******************************************************
21
20
Caching of externally stored column prefixes
22
21
 
23
22
Created September 2006 Marko Makela
31
30
#include "data0types.h"
32
31
#include "mem0mem.h"
33
32
 
34
 
/********************************************************************//**
35
 
Creates a cache of column prefixes of externally stored columns.
36
 
@return own: column prefix cache */
 
33
/************************************************************************
 
34
Creates a cache of column prefixes of externally stored columns. */
37
35
UNIV_INTERN
38
36
row_ext_t*
39
37
row_ext_create(
40
38
/*===========*/
41
 
        ulint           n_ext,  /*!< in: number of externally stored columns */
42
 
        const ulint*    ext,    /*!< in: col_no's of externally stored columns
 
39
                                /* out,own: column prefix cache */
 
40
        ulint           n_ext,  /* in: number of externally stored columns */
 
41
        const ulint*    ext,    /* in: col_no's of externally stored columns
43
42
                                in the InnoDB table object, as reported by
44
43
                                dict_col_get_no(); NOT relative to the records
45
44
                                in the clustered index */
46
 
        const dtuple_t* tuple,  /*!< in: data tuple containing the field
 
45
        const dtuple_t* tuple,  /* in: data tuple containing the field
47
46
                                references of the externally stored
48
47
                                columns; must be indexed by col_no;
49
48
                                the clustered index record must be
50
49
                                covered by a lock or a page latch
51
50
                                to prevent deletion (rollback or purge). */
52
 
        ulint           zip_size,/*!< compressed page size in bytes, or 0 */
53
 
        mem_heap_t*     heap);  /*!< in: heap where created */
 
51
        ulint           zip_size,/* compressed page size in bytes, or 0 */
 
52
        mem_heap_t*     heap);  /* in: heap where created */
54
53
 
55
 
/********************************************************************//**
56
 
Looks up a column prefix of an externally stored column.
57
 
@return column prefix, or NULL if the column is not stored externally,
58
 
or pointer to field_ref_zero if the BLOB pointer is unset */
 
54
/************************************************************************
 
55
Looks up a column prefix of an externally stored column. */
59
56
UNIV_INLINE
60
57
const byte*
61
58
row_ext_lookup_ith(
62
59
/*===============*/
63
 
        const row_ext_t*        ext,    /*!< in/out: column prefix cache */
64
 
        ulint                   i,      /*!< in: index of ext->ext[] */
65
 
        ulint*                  len);   /*!< out: length of prefix, in bytes,
 
60
                                        /* out: column prefix, or NULL if
 
61
                                        the column is not stored externally,
 
62
                                        or pointer to field_ref_zero
 
63
                                        if the BLOB pointer is unset */
 
64
        const row_ext_t*        ext,    /* in/out: column prefix cache */
 
65
        ulint                   i,      /* in: index of ext->ext[] */
 
66
        ulint*                  len);   /* out: length of prefix, in bytes,
66
67
                                        at most REC_MAX_INDEX_COL_LEN */
67
 
/********************************************************************//**
68
 
Looks up a column prefix of an externally stored column.
69
 
@return column prefix, or NULL if the column is not stored externally,
70
 
or pointer to field_ref_zero if the BLOB pointer is unset */
 
68
/************************************************************************
 
69
Looks up a column prefix of an externally stored column. */
71
70
UNIV_INLINE
72
71
const byte*
73
72
row_ext_lookup(
74
73
/*===========*/
75
 
        const row_ext_t*        ext,    /*!< in: column prefix cache */
76
 
        ulint                   col,    /*!< in: column number in the InnoDB
 
74
                                        /* out: column prefix, or NULL if
 
75
                                        the column is not stored externally,
 
76
                                        or pointer to field_ref_zero
 
77
                                        if the BLOB pointer is unset */
 
78
        const row_ext_t*        ext,    /* in: column prefix cache */
 
79
        ulint                   col,    /* in: column number in the InnoDB
77
80
                                        table object, as reported by
78
81
                                        dict_col_get_no(); NOT relative to the
79
82
                                        records in the clustered index */
80
 
        ulint*                  len);   /*!< out: length of prefix, in bytes,
 
83
        ulint*                  len);   /* out: length of prefix, in bytes,
81
84
                                        at most REC_MAX_INDEX_COL_LEN */
82
85
 
83
 
/** Prefixes of externally stored columns */
 
86
/* Prefixes of externally stored columns */
84
87
struct row_ext_struct{
85
 
        ulint           n_ext;  /*!< number of externally stored columns */
86
 
        const ulint*    ext;    /*!< col_no's of externally stored columns */
87
 
        byte*           buf;    /*!< backing store of the column prefix cache */
88
 
        ulint           len[1]; /*!< prefix lengths; 0 if not cached */
 
88
        ulint           n_ext;  /* number of externally stored columns */
 
89
        const ulint*    ext;    /* col_no's of externally stored columns */
 
90
        byte*           buf;    /* backing store of the column prefix cache */
 
91
        ulint           len[1]; /* prefix lengths; 0 if not cached */
89
92
};
90
93
 
91
94
#ifndef UNIV_NONINL