drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
row0row.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1996, 2010, Innobase Oy. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15St, Fifth Floor, Boston, MA 02110-1301 USA
16
17*****************************************************************************/
18
19/**************************************************/
25
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/*********************************************************************/
45UNIV_INTERN
46ulint
48/*==================*/
49 const rec_t* rec,
50 dict_index_t* index,
51 const ulint* offsets);
52/*********************************************************************/
55UNIV_INLINE
58/*===============*/
59 const rec_t* rec,
60 dict_index_t* index,
61 const ulint* offsets);
62/*********************************************************************/
65UNIV_INLINE
68/*=================*/
69 const rec_t* rec,
70 dict_index_t* index,
71 const ulint* offsets);
72/*****************************************************************/
78UNIV_INTERN
79dtuple_t*
81/*==================*/
82 const dtuple_t* row,
84 row_ext_t* ext,
86 dict_index_t* index,
87 mem_heap_t* heap);
89/*******************************************************************/
93UNIV_INTERN
94dtuple_t*
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/*******************************************************************/
135UNIV_INTERN
136dtuple_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/*******************************************************************/
150UNIV_INTERN
151dtuple_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/*******************************************************************/
179UNIV_INTERN
180dtuple_t*
182/*==============*/
183 ulint type,
187 dict_index_t* index,
188 const rec_t* rec,
195 mem_heap_t* heap);
197/*******************************************************************/
200UNIV_INTERN
201void
203/*=======================*/
204 dtuple_t* ref,
206 const rec_t* rec,
214 const dict_index_t* index,
215 ulint* offsets,
217 trx_t* trx);
218/*******************************************************************/
221UNIV_INLINE
222void
224/*===================*/
225 dtuple_t* ref,
227 const ulint* map,
230 const rec_t* rec,
233 const ulint* offsets);
234/***************************************************************/
238UNIV_INTERN
239ibool
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/*********************************************************************/
252UNIV_INTERN
253rec_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);
261
274
275/***************************************************************/
278UNIV_INTERN
281/*===================*/
282 dict_index_t* index,
283 const dtuple_t* entry,
284 ulint mode,
285 btr_pcur_t* pcur,
287 mtr_t* mtr);
288
289
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
298No new latches may be obtained while the kernel mutex is reserved.
299However, the kernel mutex can be reserved while latches are owned. */
300
301/*******************************************************************/
309UNIV_INTERN
310ulint
312/*===========*/
313 const char* data,
314 ulint data_len,
316 const dict_field_t* dict_field,
317 char* buf,
318 ulint buf_size);
320
321#ifndef UNIV_NONINL
322#include "row0row.ic"
323#endif
324
325#endif
struct btr_pcur_struct btr_pcur_t
Definition btr0types.h:36
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 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
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 roll_ptr_t row_get_rec_roll_ptr(const rec_t *rec, dict_index_t *index, const ulint *offsets)
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(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_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 dtuple_t * row_build_row_ref(ulint type, dict_index_t *index, const rec_t *rec, mem_heap_t *heap)
Definition row0row.cc:434
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 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 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
row_search_result
Definition row0row.h:263
@ ROW_NOT_DELETED_REF
Definition row0row.h:271
@ ROW_NOT_FOUND
Definition row0row.h:265
@ ROW_FOUND
Definition row0row.h:264
@ ROW_BUFFERED
Definition row0row.h:266
UNIV_INLINE trx_id_t row_get_rec_trx_id(const rec_t *rec, dict_index_t *index, const ulint *offsets)
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
ib_id_t trx_id_t
Definition trx0types.h:85
ib_id_t roll_ptr_t
Definition trx0types.h:87