~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/row0sel.h

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
/*************************************************************************
25
25
Creates a select node struct. */
26
 
 
 
26
UNIV_INTERN
27
27
sel_node_t*
28
28
sel_node_create(
29
29
/*============*/
32
32
/*************************************************************************
33
33
Frees the memory private to a select node when a query graph is freed,
34
34
does not free the heap where the node was originally created. */
35
 
 
 
35
UNIV_INTERN
36
36
void
37
37
sel_node_free_private(
38
38
/*==================*/
40
40
/*************************************************************************
41
41
Frees a prefetch buffer for a column, including the dynamically allocated
42
42
memory for data stored there. */
43
 
 
 
43
UNIV_INTERN
44
44
void
45
45
sel_col_prefetch_buf_free(
46
46
/*======================*/
56
56
/**************************************************************************
57
57
Performs a select step. This is a high-level function used in SQL execution
58
58
graphs. */
59
 
 
 
59
UNIV_INTERN
60
60
que_thr_t*
61
61
row_sel_step(
62
62
/*=========*/
72
72
        que_thr_t*      thr);   /* in: query thread */
73
73
/**************************************************************************
74
74
Performs a fetch for a cursor. */
75
 
 
 
75
UNIV_INTERN
76
76
que_thr_t*
77
77
fetch_step(
78
78
/*=======*/
80
80
        que_thr_t*      thr);   /* in: query thread */
81
81
/********************************************************************
82
82
Sample callback function for fetch that prints each row.*/
83
 
 
 
83
UNIV_INTERN
84
84
void*
85
85
row_fetch_print(
86
86
/*============*/
91
91
Callback function for fetch that stores an unsigned 4 byte integer to the
92
92
location pointed. The column's type must be DATA_INT, DATA_UNSIGNED, length
93
93
= 4. */
94
 
 
 
94
UNIV_INTERN
95
95
void*
96
96
row_fetch_store_uint4(
97
97
/*==================*/
100
100
        void*   user_arg);      /* in:  data pointer */
101
101
/***************************************************************
102
102
Prints a row in a select result. */
103
 
 
 
103
UNIV_INTERN
104
104
que_thr_t*
105
105
row_printf_step(
106
106
/*============*/
112
112
the parameter key_len. But currently we do not allow search keys where the
113
113
last field is only a prefix of the full key field len and print a warning if
114
114
such appears. */
115
 
 
 
115
UNIV_INTERN
116
116
void
117
117
row_sel_convert_mysql_key_to_innobase(
118
118
/*==================================*/
119
 
        dtuple_t*       tuple,          /* in: tuple where to build;
 
119
        dtuple_t*       tuple,          /* in/out: tuple where to build;
120
120
                                        NOTE: we assume that the type info
121
121
                                        in the tuple is already according
122
122
                                        to index! */
124
124
                                        conversions */
125
125
        ulint           buf_len,        /* in: buffer length */
126
126
        dict_index_t*   index,          /* in: index of the key value */
127
 
        byte*           key_ptr,        /* in: MySQL key value */
 
127
        const byte*     key_ptr,        /* in: MySQL key value */
128
128
        ulint           key_len,        /* in: MySQL key value length */
129
129
        trx_t*          trx);           /* in: transaction */
130
130
/************************************************************************
133
133
and fetch prev. NOTE that if we do a search with a full key value
134
134
from a unique index (ROW_SEL_EXACT), then we will not store the cursor
135
135
position and fetch next or fetch prev must not be tried to the cursor! */
136
 
 
 
136
UNIV_INTERN
137
137
ulint
138
138
row_search_for_mysql(
139
139
/*=================*/
162
162
/***********************************************************************
163
163
Checks if MySQL at the moment is allowed for this table to retrieve a
164
164
consistent read result, or store it to the query cache. */
165
 
 
 
165
UNIV_INTERN
166
166
ibool
167
167
row_search_check_if_query_cache_permitted(
168
168
/*======================================*/
173
173
                                        '/' char, table name */
174
174
/***********************************************************************
175
175
Read the max AUTOINC value from an index. */
176
 
 
 
176
UNIV_INTERN
177
177
ulint
178
178
row_search_max_autoinc(
179
179
/*===================*/
181
181
                                        error code */
182
182
        dict_index_t*   index,          /* in: index to search */
183
183
        const char*     col_name,       /* in: autoinc column name */
184
 
        ib_longlong*    value);         /* out: AUTOINC value read */
 
184
        ib_uint64_t*    value);         /* out: AUTOINC value read */
185
185
 
186
186
/* A structure for caching column values for prefetched rows */
187
187
struct sel_buf_struct{