Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
row0sel.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (C) 1997, 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 row0sel_h
28
#define row0sel_h
29
30
#include "univ.i"
31
#include "
data0data.h
"
32
#include "
que0types.h
"
33
#include "
dict0types.h
"
34
#include "
trx0types.h
"
35
#include "
row0types.h
"
36
#include "
que0types.h
"
37
#include "
pars0sym.h
"
38
#include "
btr0pcur.h
"
39
#include "
read0read.h
"
40
#include "
row0mysql.h
"
41
42
/*********************************************************************/
45
UNIV_INTERN
46
sel_node_t
*
47
sel_node_create
(
48
/*============*/
49
mem_heap_t
* heap);
50
/*********************************************************************/
53
UNIV_INTERN
54
void
55
sel_node_free_private
(
56
/*==================*/
57
sel_node_t
* node);
58
/*********************************************************************/
61
UNIV_INTERN
62
void
63
sel_col_prefetch_buf_free
(
64
/*======================*/
65
sel_buf_t
* prefetch_buf);
66
/*********************************************************************/
69
UNIV_INLINE
70
plan_t
*
71
sel_node_get_nth_plan
(
72
/*==================*/
73
sel_node_t
* node,
74
ulint i);
75
/**********************************************************************/
79
UNIV_INTERN
80
que_thr_t
*
81
row_sel_step
(
82
/*=========*/
83
que_thr_t
* thr);
84
/**********************************************************************/
87
UNIV_INLINE
88
que_thr_t
*
89
open_step
(
90
/*======*/
91
que_thr_t
* thr);
92
/**********************************************************************/
95
UNIV_INTERN
96
que_thr_t
*
97
fetch_step
(
98
/*=======*/
99
que_thr_t
* thr);
100
/****************************************************************/
103
UNIV_INTERN
104
void
*
105
row_fetch_print
(
106
/*============*/
107
void
* row,
108
void
* user_arg);
109
/***********************************************************/
112
UNIV_INTERN
113
que_thr_t
*
114
row_printf_step
(
115
/*============*/
116
que_thr_t
* thr);
117
/****************************************************************/
123
UNIV_INTERN
124
void
125
row_sel_convert_mysql_key_to_innobase
(
126
/*==================================*/
127
dtuple_t
* tuple,
131
byte* buf,
133
ulint buf_len,
134
dict_index_t
* index,
135
const
byte* key_ptr,
136
ulint key_len,
137
trx_t
* trx);
138
/********************************************************************/
146
UNIV_INTERN
147
ulint
148
row_search_for_mysql
(
149
/*=================*/
150
byte* buf,
152
ulint mode,
153
row_prebuilt_t
* prebuilt,
160
ulint match_mode,
162
ulint direction);
167
/*******************************************************************/
171
UNIV_INTERN
172
ibool
173
row_search_check_if_query_cache_permitted
(
174
/*======================================*/
175
trx_t
* trx,
176
const
char
* norm_name);
178
/*******************************************************************/
181
UNIV_INTERN
182
ulint
183
row_search_max_autoinc
(
184
/*===================*/
185
dict_index_t
* index,
186
const
char
* col_name,
187
ib_uint64_t* value);
190
struct
sel_buf_struct
{
191
byte*
data
;
195
ulint
len
;
196
ulint
val_buf_size
;
200
};
201
203
struct
plan_struct
{
204
dict_table_t
*
table
;
206
dict_index_t
*
index
;
207
btr_pcur_t
pcur
;
209
ibool
asc
;
210
ibool
pcur_is_open
;
212
ibool
cursor_at_end
;
219
ibool
stored_cursor_rec_processed
;
223
que_node_t**
tuple_exps
;
229
dtuple_t
*
tuple
;
230
ulint
mode
;
231
ulint
n_exact_match
;
234
ibool
unique_search
;
236
ulint
n_rows_fetched
;
238
ulint
n_rows_prefetched
;
241
ulint
first_prefetched
;
243
ibool
no_prefetch
;
244
sym_node_list_t
columns
;
246
UT_LIST_BASE_NODE_T
(
func_node_t
)
247
end_conds
;
255
UT_LIST_BASE_NODE_T
(
func_node_t
)
256
other_conds
;
258
ibool
must_get_clust
;
266
ulint*
clust_map
;
269
dtuple_t
*
clust_ref
;
272
btr_pcur_t
clust_pcur
;
275
mem_heap_t
*
old_vers_heap
;
277
};
278
280
enum
sel_node_state
{
281
SEL_NODE_CLOSED
,
283
SEL_NODE_OPEN
,
284
SEL_NODE_FETCH
,
285
SEL_NODE_NO_MORE_ROWS
286
};
287
289
struct
sel_node_struct
{
290
que_common_t
common
;
291
enum
sel_node_state
292
state
;
293
que_node_t*
select_list
;
294
sym_node_t
*
into_list
;
295
sym_node_t
*
table_list
;
296
ibool
asc
;
298
ibool set_x_locks;
301
ulint
row_lock_mode
;
302
ulint
n_tables
;
303
ulint fetch_table;
305
plan_t
* plans;
308
que_node_t*
search_cond
;
309
read_view_t
* read_view;
312
ibool consistent_read;
314
order_node_t
* order_by;
316
ibool is_aggregate;
318
ibool aggregate_already_fetched;
322
ibool can_get_updated;
333
sym_node_t
*
explicit_cursor
;
334
UT_LIST_BASE_NODE_T
(
sym_node_t
)
335
copy_variables;
339
};
340
342
struct
fetch_node_struct
{
343
que_common_t
common
;
344
sel_node_t
*
cursor_def
;
345
sym_node_t
*
into_list
;
347
pars_user_func_t
*
348
func;
360
};
361
363
enum
open_node_op
{
364
ROW_SEL_OPEN_CURSOR
,
365
ROW_SEL_CLOSE_CURSOR
366
};
367
369
struct
open_node_struct
{
370
que_common_t
common
;
371
enum
open_node_op
372
op_type;
374
sel_node_t
*
cursor_def
;
375
};
376
378
struct
row_printf_node_struct
{
379
que_common_t
common
;
380
sel_node_t
*
sel_node
;
381
};
382
384
enum
row_sel_direction
{
385
ROW_SEL_NEXT
= 1,
386
ROW_SEL_PREV
= 2
387
};
388
390
enum
row_sel_match_mode
{
391
ROW_SEL_EXACT
= 1,
392
ROW_SEL_EXACT_PREFIX
397
};
398
399
#ifndef UNIV_NONINL
400
#include "row0sel.ic"
401
#endif
402
403
#endif
plugin
innobase
include
row0sel.h
Generated on Fri Mar 28 2014 08:14:31 for drizzle by
1.8.1.2