InnoDB Plugin
1.0
Main Page
Data Structures
Files
File List
Globals
include
row0sel.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (c) 1997, 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 row0sel_h
27
#define row0sel_h
28
29
#include "
univ.i
"
30
#include "
data0data.h
"
31
#include "
que0types.h
"
32
#include "
dict0types.h
"
33
#include "
trx0types.h
"
34
#include "
row0types.h
"
35
#include "
que0types.h
"
36
#include "
pars0sym.h
"
37
#include "
btr0pcur.h
"
38
#include "
read0read.h
"
39
#include "
row0mysql.h
"
40
41
/*********************************************************************/
44
UNIV_INTERN
45
sel_node_t
*
46
sel_node_create
(
47
/*============*/
48
mem_heap_t
* heap);
49
/*********************************************************************/
52
UNIV_INTERN
53
void
54
sel_node_free_private
(
55
/*==================*/
56
sel_node_t
* node);
57
/*********************************************************************/
60
UNIV_INTERN
61
void
62
sel_col_prefetch_buf_free
(
63
/*======================*/
64
sel_buf_t
* prefetch_buf);
65
/*********************************************************************/
68
UNIV_INLINE
69
plan_t
*
70
sel_node_get_nth_plan
(
71
/*==================*/
72
sel_node_t
* node,
73
ulint i);
74
/**********************************************************************/
78
UNIV_INTERN
79
que_thr_t
*
80
row_sel_step
(
81
/*=========*/
82
que_thr_t
* thr);
83
/**********************************************************************/
86
UNIV_INLINE
87
que_thr_t
*
88
open_step
(
89
/*======*/
90
que_thr_t
* thr);
91
/**********************************************************************/
94
UNIV_INTERN
95
que_thr_t
*
96
fetch_step
(
97
/*=======*/
98
que_thr_t
* thr);
99
/****************************************************************/
102
UNIV_INTERN
103
void
*
104
row_fetch_print
(
105
/*============*/
106
void
* row,
107
void
* user_arg);
108
/***********************************************************/
111
UNIV_INTERN
112
que_thr_t
*
113
row_printf_step
(
114
/*============*/
115
que_thr_t
* thr);
116
/****************************************************************/
122
UNIV_INTERN
123
void
124
row_sel_convert_mysql_key_to_innobase
(
125
/*==================================*/
126
dtuple_t
* tuple,
130
byte* buf,
137
ulint buf_len,
138
dict_index_t
* index,
139
const
byte* key_ptr,
140
ulint key_len,
141
trx_t
* trx);
142
/********************************************************************/
150
UNIV_INTERN
151
dberr_t
152
row_search_for_mysql
(
153
/*=================*/
154
byte* buf,
156
ulint mode,
157
row_prebuilt_t
* prebuilt,
164
ulint match_mode,
166
ulint direction)
171
__attribute__((nonnull, warn_unused_result));
172
/*******************************************************************/
176
UNIV_INTERN
177
ibool
178
row_search_check_if_query_cache_permitted
(
179
/*======================================*/
180
trx_t
* trx,
181
const
char
* norm_name);
183
/*******************************************************************/
186
UNIV_INTERN
187
dberr_t
188
row_search_max_autoinc
(
189
/*===================*/
190
dict_index_t
* index,
191
const
char
* col_name,
192
ib_uint64_t* value)
193
__attribute__((nonnull, warn_unused_result));
194
196
struct
sel_buf_t
{
197
byte*
data
;
201
ulint
len
;
202
ulint
val_buf_size
;
206
};
207
209
struct
plan_t
{
210
dict_table_t
*
table
;
212
dict_index_t
*
index
;
213
btr_pcur_t
pcur
;
215
ibool
asc
;
216
ibool
pcur_is_open
;
218
ibool
cursor_at_end
;
225
ibool
stored_cursor_rec_processed
;
229
que_node_t**
tuple_exps
;
235
dtuple_t
*
tuple
;
236
ulint
mode
;
237
ulint
n_exact_match
;
240
ibool
unique_search
;
242
ulint
n_rows_fetched
;
244
ulint
n_rows_prefetched
;
247
ulint
first_prefetched
;
249
ibool
no_prefetch
;
250
sym_node_list_t
columns
;
252
UT_LIST_BASE_NODE_T(
func_node_t
)
253
end_conds
;
261
UT_LIST_BASE_NODE_T(
func_node_t
)
262
other_conds
;
264
ibool
must_get_clust
;
272
ulint*
clust_map
;
275
dtuple_t
*
clust_ref
;
278
btr_pcur_t
clust_pcur
;
281
mem_heap_t
*
old_vers_heap
;
283
};
284
286
enum
sel_node_state
{
287
SEL_NODE_CLOSED
,
289
SEL_NODE_OPEN
,
290
SEL_NODE_FETCH
,
291
SEL_NODE_NO_MORE_ROWS
292
};
293
295
struct
sel_node_t
{
296
que_common_t
common
;
297
enum
sel_node_state
298
state
;
299
que_node_t*
select_list
;
300
sym_node_t
*
into_list
;
301
sym_node_t
*
table_list
;
302
ibool
asc
;
304
ibool
set_x_locks;
307
ulint
row_lock_mode
;
308
ulint
n_tables
;
309
ulint fetch_table;
311
plan_t
* plans;
314
que_node_t*
search_cond
;
315
read_view_t
* read_view;
318
ibool
consistent_read;
320
order_node_t
* order_by;
322
ibool
is_aggregate;
324
ibool
aggregate_already_fetched;
328
ibool
can_get_updated;
339
sym_node_t
*
explicit_cursor
;
340
UT_LIST_BASE_NODE_T(
sym_node_t
)
341
copy_variables;
345
};
346
348
struct
fetch_node_t
{
349
que_common_t
common
;
350
sel_node_t
*
cursor_def
;
351
sym_node_t
*
into_list
;
353
pars_user_func_t
*
354
func;
366
};
367
369
enum
open_node_op
{
370
ROW_SEL_OPEN_CURSOR
,
371
ROW_SEL_CLOSE_CURSOR
372
};
373
375
struct
open_node_t
{
376
que_common_t
common
;
377
enum
open_node_op
378
op_type;
380
sel_node_t
*
cursor_def
;
381
};
382
384
struct
row_printf_node_t
{
385
que_common_t
common
;
386
sel_node_t
*
sel_node
;
387
};
388
390
enum
row_sel_direction
{
391
ROW_SEL_NEXT
= 1,
392
ROW_SEL_PREV
= 2
393
};
394
396
enum
row_sel_match_mode
{
397
ROW_SEL_EXACT
= 1,
398
ROW_SEL_EXACT_PREFIX
403
};
404
405
#ifndef UNIV_NONINL
406
#include "
row0sel.ic
"
407
#endif
408
409
#endif
Generated on Fri Aug 21 2015 19:14:24 for InnoDB Plugin by
1.8.1.2