InnoDB Plugin  1.0
row0row.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (c) 1996, 2012, 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 row0row_h
27 #define row0row_h
28 
29 #include "univ.i"
30 #include "data0data.h"
31 #include "dict0types.h"
32 #include "trx0types.h"
33 #include "que0types.h"
34 #include "mtr0mtr.h"
35 #include "rem0types.h"
36 #include "read0types.h"
37 #include "row0types.h"
38 #include "btr0types.h"
39 
40 /*********************************************************************/
44 UNIV_INLINE
45 ulint
47 /*==================*/
48  const dict_index_t* index,
49  const ulint* offsets)
50  __attribute__((nonnull, warn_unused_result));
51 /*********************************************************************/
54 UNIV_INLINE
57 /*===============*/
58  const rec_t* rec,
59  const dict_index_t* index,
60  const ulint* offsets)
61  __attribute__((nonnull, warn_unused_result));
62 /*********************************************************************/
65 UNIV_INLINE
68 /*=================*/
69  const rec_t* rec,
70  const dict_index_t* index,
71  const ulint* offsets)
72  __attribute__((nonnull, warn_unused_result));
73 /*****************************************************************/
79 UNIV_INTERN
80 dtuple_t*
82 /*======================*/
83  const dtuple_t* row,
85  const row_ext_t* ext,
87  dict_index_t* index,
88  mem_heap_t* heap)
91  __attribute__((warn_unused_result, nonnull(1,3,4)));
92 /*****************************************************************/
98 UNIV_INLINE
99 dtuple_t*
101 /*==================*/
102  const dtuple_t* row,
104  const row_ext_t* ext,
106  dict_index_t* index,
107  mem_heap_t* heap)
110  __attribute__((warn_unused_result, nonnull(1,3,4)));
111 /*******************************************************************/
115 UNIV_INTERN
116 dtuple_t*
117 row_build(
118 /*======*/
119  ulint type,
126  const dict_index_t* index,
127  const rec_t* rec,
136  const ulint* offsets,
139  const dict_table_t* col_table,
148  const dtuple_t* add_cols,
151  const ulint* col_map,
153  row_ext_t** ext,
156  mem_heap_t* heap)
158  __attribute__((nonnull(2,3,9)));
159 /*******************************************************************/
163 UNIV_INTERN
164 dtuple_t*
166 /*=======================*/
167  const rec_t* rec,
168  const dict_index_t* index,
169  const ulint* offsets,
170  ulint* n_ext,
172  mem_heap_t* heap)
174  __attribute__((nonnull, warn_unused_result));
175 /*******************************************************************/
179 UNIV_INTERN
180 dtuple_t*
182 /*===================*/
183  const rec_t* rec,
184  const dict_index_t* index,
185  const ulint* offsets,
186  ulint* n_ext,
188  mem_heap_t* heap)
190  __attribute__((nonnull, warn_unused_result));
191 /*******************************************************************/
195 UNIV_INTERN
196 dtuple_t*
198 /*==============*/
199  ulint type,
203  dict_index_t* index,
204  const rec_t* rec,
211  mem_heap_t* heap)
213  __attribute__((nonnull, warn_unused_result));
214 /*******************************************************************/
217 UNIV_INTERN
218 void
220 /*=======================*/
221  dtuple_t* ref,
223  const rec_t* rec,
231  const dict_index_t* index,
232  ulint* offsets,
234  trx_t* trx)
235  __attribute__((nonnull(1,2,3)));
236 /*******************************************************************/
239 UNIV_INLINE
240 void
242 /*===================*/
243  dtuple_t* ref,
245  const ulint* map,
248  const rec_t* rec,
251  const ulint* offsets);
252 /***************************************************************/
256 UNIV_INTERN
257 ibool
259 /*==================*/
260  btr_pcur_t* pcur,
262  ulint mode,
263  const dict_table_t* table,
264  const dtuple_t* ref,
265  mtr_t* mtr)
266  __attribute__((nonnull, warn_unused_result));
267 /*********************************************************************/
271 UNIV_INTERN
272 rec_t*
274 /*==============*/
275  ulint mode,
276  const rec_t* rec,
277  dict_index_t* index,
278  dict_index_t** clust_index,
279  mtr_t* mtr)
280  __attribute__((nonnull, warn_unused_result));
281 
284  ROW_FOUND = 0,
293 };
294 
295 /***************************************************************/
298 UNIV_INTERN
301 /*===================*/
302  dict_index_t* index,
303  const dtuple_t* entry,
304  ulint mode,
305  btr_pcur_t* pcur,
307  mtr_t* mtr)
308  __attribute__((nonnull, warn_unused_result));
309 
310 #define ROW_COPY_DATA 1
311 #define ROW_COPY_POINTERS 2
312 
313 /* The allowed latching order of index records is the following:
314 (1) a secondary index record ->
315 (2) the clustered index record ->
316 (3) rollback segment data for the clustered index record. */
317 
318 /*******************************************************************/
326 UNIV_INTERN
327 ulint
329 /*===========*/
330  const char* data,
331  ulint data_len,
333  const dict_field_t* dict_field,
334  char* buf,
335  ulint buf_size)
337  __attribute__((nonnull, warn_unused_result));
338 
339 #ifndef UNIV_NONINL
340 #include "row0row.ic"
341 #endif
342 
343 #endif