Drizzled Public API Documentation

row0row.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (C) 1996, 2010, 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 /**************************************************/
26 #pragma once
27 #ifndef row0row_h
28 #define row0row_h
29 
30 #include "univ.i"
31 #include "data0data.h"
32 #include "dict0types.h"
33 #include "trx0types.h"
34 #include "que0types.h"
35 #include "mtr0mtr.h"
36 #include "rem0types.h"
37 #include "read0types.h"
38 #include "row0types.h"
39 #include "btr0types.h"
40 
41 /*********************************************************************/
45 UNIV_INTERN
46 ulint
48 /*==================*/
49  const rec_t* rec,
50  dict_index_t* index,
51  const ulint* offsets);
52 /*********************************************************************/
55 UNIV_INLINE
58 /*===============*/
59  const rec_t* rec,
60  dict_index_t* index,
61  const ulint* offsets);
62 /*********************************************************************/
65 UNIV_INLINE
68 /*=================*/
69  const rec_t* rec,
70  dict_index_t* index,
71  const ulint* offsets);
72 /*****************************************************************/
78 UNIV_INTERN
79 dtuple_t*
81 /*==================*/
82  const dtuple_t* row,
84  row_ext_t* ext,
86  dict_index_t* index,
87  mem_heap_t* heap);
89 /*******************************************************************/
93 UNIV_INTERN
94 dtuple_t*
95 row_build(
96 /*======*/
97  ulint type,
104  const dict_index_t* index,
105  const rec_t* rec,
114  const ulint* offsets,
117  const dict_table_t* col_table,
126  row_ext_t** ext,
129  mem_heap_t* heap);
131 /*******************************************************************/
135 UNIV_INTERN
136 dtuple_t*
138 /*=======================*/
139  const rec_t* rec,
140  const dict_index_t* index,
141  const ulint* offsets,
142  ulint* n_ext,
144  mem_heap_t* heap);
146 /*******************************************************************/
150 UNIV_INTERN
151 dtuple_t*
153 /*===================*/
154  ulint type,
160  const rec_t* rec,
169  const dict_index_t* index,
170  ulint* offsets,
171  ulint* n_ext,
173  mem_heap_t* heap);
175 /*******************************************************************/
179 UNIV_INTERN
180 dtuple_t*
182 /*==============*/
183  ulint type,
187  dict_index_t* index,
188  const rec_t* rec,
195  mem_heap_t* heap);
197 /*******************************************************************/
200 UNIV_INTERN
201 void
203 /*=======================*/
204  dtuple_t* ref,
206  const rec_t* rec,
214  const dict_index_t* index,
215  ulint* offsets,
217  trx_t* trx);
218 /*******************************************************************/
221 UNIV_INLINE
222 void
224 /*===================*/
225  dtuple_t* ref,
227  const ulint* map,
230  const rec_t* rec,
233  const ulint* offsets);
234 /***************************************************************/
238 UNIV_INTERN
239 ibool
241 /*==================*/
242  btr_pcur_t* pcur,
244  ulint mode,
245  const dict_table_t* table,
246  const dtuple_t* ref,
247  mtr_t* mtr);
248 /*********************************************************************/
252 UNIV_INTERN
253 rec_t*
255 /*==============*/
256  ulint mode,
257  const rec_t* rec,
258  dict_index_t* index,
259  dict_index_t** clust_index,
260  mtr_t* mtr);
264  ROW_FOUND = 0,
273 };
274 
275 /***************************************************************/
278 UNIV_INTERN
281 /*===================*/
282  dict_index_t* index,
283  const dtuple_t* entry,
284  ulint mode,
285  btr_pcur_t* pcur,
287  mtr_t* mtr);
290 #define ROW_COPY_DATA 1
291 #define ROW_COPY_POINTERS 2
292 
293 /* The allowed latching order of index records is the following:
294 (1) a secondary index record ->
295 (2) the clustered index record ->
296 (3) rollback segment data for the clustered index record.
297 
298 No new latches may be obtained while the kernel mutex is reserved.
299 However, the kernel mutex can be reserved while latches are owned. */
300 
301 /*******************************************************************/
309 UNIV_INTERN
310 ulint
312 /*===========*/
313  const char* data,
314  ulint data_len,
316  const dict_field_t* dict_field,
317  char* buf,
318  ulint buf_size);
321 #ifndef UNIV_NONINL
322 #include "row0row.ic"
323 #endif
324 
325 #endif
UNIV_INTERN ulint row_get_trx_id_offset(const rec_t *rec, dict_index_t *index, const ulint *offsets)
Definition: row0row.cc:56
UNIV_INTERN rec_t * row_get_clust_rec(ulint mode, const rec_t *rec, dict_index_t *index, dict_index_t **clust_index, mtr_t *mtr)
Definition: row0row.cc:699
UNIV_INLINE trx_id_t row_get_rec_trx_id(const rec_t *rec, dict_index_t *index, const ulint *offsets)
ib_id_t roll_ptr_t
Definition: trx0types.h:87
UNIV_INLINE roll_ptr_t row_get_rec_roll_ptr(const rec_t *rec, dict_index_t *index, const ulint *offsets)
UNIV_INTERN dtuple_t * row_build(ulint type, const dict_index_t *index, const rec_t *rec, const ulint *offsets, const dict_table_t *col_table, row_ext_t **ext, mem_heap_t *heap)
Definition: row0row.cc:175
UNIV_INTERN dtuple_t * row_build_index_entry(const dtuple_t *row, row_ext_t *ext, dict_index_t *index, mem_heap_t *heap)
Definition: row0row.cc:87
UNIV_INLINE void row_build_row_ref_fast(dtuple_t *ref, const ulint *map, const rec_t *rec, const ulint *offsets)
UNIV_INTERN dtuple_t * row_rec_to_index_entry_low(const rec_t *rec, const dict_index_t *index, const ulint *offsets, ulint *n_ext, mem_heap_t *heap)
Definition: row0row.cc:324
UNIV_INTERN ulint row_raw_format(const char *data, ulint data_len, const dict_field_t *dict_field, char *buf, ulint buf_size)
Definition: row0row.cc:913
row_search_result
Definition: row0row.h:263
UNIV_INTERN enum row_search_result row_search_index_entry(dict_index_t *index, const dtuple_t *entry, ulint mode, btr_pcur_t *pcur, mtr_t *mtr)
Definition: row0row.cc:740
UNIV_INTERN void row_build_row_ref_in_tuple(dtuple_t *ref, const rec_t *rec, const dict_index_t *index, ulint *offsets, trx_t *trx)
Definition: row0row.cc:543
UNIV_INTERN dtuple_t * row_build_row_ref(ulint type, dict_index_t *index, const rec_t *rec, mem_heap_t *heap)
Definition: row0row.cc:434
ib_id_t trx_id_t
Definition: trx0types.h:85
UNIV_INTERN dtuple_t * row_rec_to_index_entry(ulint type, const rec_t *rec, const dict_index_t *index, ulint *offsets, ulint *n_ext, mem_heap_t *heap)
Definition: row0row.cc:382
UNIV_INTERN ibool row_search_on_row_ref(btr_pcur_t *pcur, ulint mode, const dict_table_t *table, const dtuple_t *ref, mtr_t *mtr)
Definition: row0row.cc:655