~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/row/row0ext.c

  • Committer: Monty Taylor
  • Date: 2009-03-04 02:48:12 UTC
  • mto: (917.1.2 mordred)
  • mto: This revision was merged to the branch mainline in revision 918.
  • Revision ID: mordred@inaugust.com-20090304024812-5wb6wpye5c1iitbq
Applied atomic patch to current tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
 
3
 
Copyright (c) 2006, 2009, Innobase Oy. All Rights Reserved.
4
 
 
5
 
This program is free software; you can redistribute it and/or modify it under
6
 
the terms of the GNU General Public License as published by the Free Software
7
 
Foundation; version 2 of the License.
8
 
 
9
 
This program is distributed in the hope that it will be useful, but WITHOUT
10
 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
 
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
 
 
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
16
 
 
17
 
*****************************************************************************/
18
 
 
19
 
/**************************************************//**
20
 
@file row/row0ext.c
 
1
/******************************************************
21
2
Caching of externally stored column prefixes
22
3
 
 
4
(c) 2006 Innobase Oy
 
5
 
23
6
Created September 2006 Marko Makela
24
7
*******************************************************/
25
8
 
31
14
 
32
15
#include "btr0cur.h"
33
16
 
34
 
/********************************************************************//**
 
17
/************************************************************************
35
18
Fills the column prefix cache of an externally stored column. */
36
19
static
37
20
void
38
21
row_ext_cache_fill(
39
22
/*===============*/
40
 
        row_ext_t*      ext,    /*!< in/out: column prefix cache */
41
 
        ulint           i,      /*!< in: index of ext->ext[] */
42
 
        ulint           zip_size,/*!< compressed page size in bytes, or 0 */
43
 
        const dfield_t* dfield) /*!< in: data field */
 
23
        row_ext_t*      ext,    /* in/out: column prefix cache */
 
24
        ulint           i,      /* in: index of ext->ext[] */
 
25
        ulint           zip_size,/* compressed page size in bytes, or 0 */
 
26
        const dfield_t* dfield) /* in: data field */
44
27
{
45
28
        const byte*     field   = dfield_get_data(dfield);
46
29
        ulint           f_len   = dfield_get_len(dfield);
67
50
        }
68
51
}
69
52
 
70
 
/********************************************************************//**
71
 
Creates a cache of column prefixes of externally stored columns.
72
 
@return own: column prefix cache */
 
53
/************************************************************************
 
54
Creates a cache of column prefixes of externally stored columns. */
73
55
UNIV_INTERN
74
56
row_ext_t*
75
57
row_ext_create(
76
58
/*===========*/
77
 
        ulint           n_ext,  /*!< in: number of externally stored columns */
78
 
        const ulint*    ext,    /*!< in: col_no's of externally stored columns
 
59
                                /* out,own: column prefix cache */
 
60
        ulint           n_ext,  /* in: number of externally stored columns */
 
61
        const ulint*    ext,    /* in: col_no's of externally stored columns
79
62
                                in the InnoDB table object, as reported by
80
63
                                dict_col_get_no(); NOT relative to the records
81
64
                                in the clustered index */
82
 
        const dtuple_t* tuple,  /*!< in: data tuple containing the field
 
65
        const dtuple_t* tuple,  /* in: data tuple containing the field
83
66
                                references of the externally stored
84
67
                                columns; must be indexed by col_no;
85
68
                                the clustered index record must be
86
69
                                covered by a lock or a page latch
87
70
                                to prevent deletion (rollback or purge). */
88
 
        ulint           zip_size,/*!< compressed page size in bytes, or 0 */
89
 
        mem_heap_t*     heap)   /*!< in: heap where created */
 
71
        ulint           zip_size,/* compressed page size in bytes, or 0 */
 
72
        mem_heap_t*     heap)   /* in: heap where created */
90
73
{
91
74
        ulint           i;
92
75
        row_ext_t*      ret = mem_heap_alloc(heap, (sizeof *ret)