InnoDB Plugin  1.0
btr0types.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (c) 1996, 2011, Oracle and/or its affiliates. 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.,
15 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
16 
17 *****************************************************************************/
18 
19 /********************************************************************/
26 #ifndef btr0types_h
27 #define btr0types_h
28 
29 #include "univ.i"
30 
31 #include "rem0types.h"
32 #include "page0types.h"
33 #include "sync0rw.h"
34 
36 struct btr_pcur_t;
38 struct btr_cur_t;
40 struct btr_search_t;
41 
42 #ifndef UNIV_HOTBACKUP
43 
58 
59 #endif /* UNIV_HOTBACKUP */
60 
62 #define btr_search_latch (*btr_search_latch_temp)
63 
66 extern char btr_search_enabled;
67 
68 #ifdef UNIV_BLOB_DEBUG
69 # include "buf0types.h"
71 struct btr_blob_dbg_t;
72 
77 UNIV_INTERN
78 void
79 btr_blob_dbg_rbt_insert(
80 /*====================*/
81  dict_index_t* index,
82  const btr_blob_dbg_t* b,
83  const char* ctx)
84  __attribute__((nonnull));
85 
90 UNIV_INTERN
91 void
92 btr_blob_dbg_rbt_delete(
93 /*====================*/
94  dict_index_t* index,
95  const btr_blob_dbg_t* b,
96  const char* ctx)
97  __attribute__((nonnull));
98 
99 /**************************************************************/
102 UNIV_INTERN
103 ulint
104 btr_blob_dbg_add_rec(
105 /*=================*/
106  const rec_t* rec,
107  dict_index_t* index,
108  const ulint* offsets,
109  const char* ctx)
110  __attribute__((nonnull));
111 /**************************************************************/
114 UNIV_INTERN
115 ulint
116 btr_blob_dbg_remove_rec(
117 /*====================*/
118  const rec_t* rec,
119  dict_index_t* index,
120  const ulint* offsets,
121  const char* ctx)
122  __attribute__((nonnull));
123 /**************************************************************/
127 UNIV_INTERN
128 ulint
129 btr_blob_dbg_add(
130 /*=============*/
131  const page_t* page,
132  dict_index_t* index,
133  const char* ctx)
134  __attribute__((nonnull));
135 /**************************************************************/
140 UNIV_INTERN
141 ulint
142 btr_blob_dbg_remove(
143 /*================*/
144  const page_t* page,
145  dict_index_t* index,
146  const char* ctx)
147  __attribute__((nonnull));
148 /**************************************************************/
151 UNIV_INTERN
152 void
153 btr_blob_dbg_restore(
154 /*=================*/
155  const page_t* npage,
156  const page_t* page,
157  dict_index_t* index,
158  const char* ctx)
159  __attribute__((nonnull));
160 
167 typedef ulint (*btr_blob_dbg_op_f)
168 (const rec_t* rec,dict_index_t* index,const ulint* offsets,const char* ctx);
169 
170 /**************************************************************/
173 UNIV_INTERN
174 ulint
175 btr_blob_dbg_op(
176 /*============*/
177  const page_t* page,
178  const rec_t* rec,
180  dict_index_t* index,
181  const char* ctx,
182  const btr_blob_dbg_op_f op)
183  __attribute__((nonnull(1,3,4,5)));
184 #else /* UNIV_BLOB_DEBUG */
185 # define btr_blob_dbg_add_rec(rec, index, offsets, ctx) ((void) 0)
186 # define btr_blob_dbg_add(page, index, ctx) ((void) 0)
187 # define btr_blob_dbg_remove_rec(rec, index, offsets, ctx) ((void) 0)
188 # define btr_blob_dbg_remove(page, index, ctx) ((void) 0)
189 # define btr_blob_dbg_restore(npage, page, index, ctx) ((void) 0)
190 # define btr_blob_dbg_op(page, rec, index, ctx, op) ((void) 0)
191 #endif /* UNIV_BLOB_DEBUG */
192 
196 #define BTR_EXTERN_FIELD_REF_SIZE 20
197 
201 extern const byte field_ref_zero[BTR_EXTERN_FIELD_REF_SIZE];
202 
203 #endif