InnoDB Plugin  1.0
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
47 /*============*/
48  mem_heap_t* heap);
49 /*********************************************************************/
52 UNIV_INTERN
53 void
55 /*==================*/
56  sel_node_t* node);
57 /*********************************************************************/
60 UNIV_INTERN
61 void
63 /*======================*/
64  sel_buf_t* prefetch_buf);
65 /*********************************************************************/
68 UNIV_INLINE
69 plan_t*
71 /*==================*/
72  sel_node_t* node,
73  ulint i);
74 /**********************************************************************/
78 UNIV_INTERN
79 que_thr_t*
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*
97 /*=======*/
98  que_thr_t* thr);
99 /****************************************************************/
102 UNIV_INTERN
103 void*
105 /*============*/
106  void* row,
107  void* user_arg);
108 /***********************************************************/
111 UNIV_INTERN
112 que_thr_t*
114 /*============*/
115  que_thr_t* thr);
116 /****************************************************************/
122 UNIV_INTERN
123 void
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
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
179 /*======================================*/
180  trx_t* trx,
181  const char* norm_name);
183 /*******************************************************************/
186 UNIV_INTERN
187 dberr_t
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{
229  que_node_t** tuple_exps;
236  ulint mode;
250  sym_node_list_t columns;
252  UT_LIST_BASE_NODE_T(func_node_t)
261  UT_LIST_BASE_NODE_T(func_node_t)
272  ulint* clust_map;
283 };
284 
292 };
293 
295 struct sel_node_t{
298  state;
299  que_node_t* select_list;
304  ibool set_x_locks;
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;
340  UT_LIST_BASE_NODE_T(sym_node_t)
341  copy_variables;
345 };
346 
354  func;
366 };
367 
372 };
373 
375 struct open_node_t{
378  op_type;
381 };
382 
387 };
388 
393 };
394 
403 };
404 
405 #ifndef UNIV_NONINL
406 #include "row0sel.ic"
407 #endif
408 
409 #endif