~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.h

MergedĀ build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
#include <vector>
35
35
 
 
36
namespace drizzled
 
37
{
36
38
 
37
39
class select_result;
38
40
 
63
65
  List<Item> *fields;
64
66
} ROLLUP;
65
67
 
 
68
} /* namespace drizzled */
 
69
 
 
70
/** @TODO why is this in the middle of the file??? */
 
71
 
66
72
#include "drizzled/join.h"
67
73
 
 
74
namespace drizzled
 
75
{
 
76
 
68
77
/*****************************************************************************
69
78
  Make som simple condition optimization:
70
79
  If there is a test 'field = const' change all refs to 'field' to 'const'
138
147
bool change_group_ref(Session *session, Item_func *expr, order_st *group_list, bool *changed);
139
148
bool check_interleaving_with_nj(JoinTable *last, JoinTable *next);
140
149
 
141
 
int join_read_const_table(JoinTable *tab, drizzled::optimizer::Position *pos);
 
150
int join_read_const_table(JoinTable *tab, optimizer::Position *pos);
142
151
int join_read_system(JoinTable *tab);
143
152
int join_read_const(JoinTable *tab);
144
153
int join_read_key(JoinTable *tab);
162
171
 
163
172
void calc_used_field_length(Session *, JoinTable *join_tab);
164
173
StoredKey *get_store_key(Session *session, 
165
 
                         drizzled::optimizer::KeyUse *keyuse,
 
174
                         optimizer::KeyUse *keyuse,
166
175
                         table_map used_tables,
167
176
                         KEY_PART_INFO *key_part,
168
177
                         unsigned char *key_buff,
169
178
                         uint32_t maybe_null);
170
 
extern "C" int join_tab_cmp(const void* ptr1, const void* ptr2);
171
 
extern "C" int join_tab_cmp_straight(const void* ptr1, const void* ptr2);
 
179
int join_tab_cmp(const void* ptr1, const void* ptr2);
 
180
int join_tab_cmp_straight(const void* ptr1, const void* ptr2);
172
181
void push_index_cond(JoinTable *tab, uint32_t keyno, bool other_tbls_ok);
173
182
void add_not_null_conds(JOIN *join);
174
183
uint32_t max_part_bit(key_part_map bits);
180
189
                                List<Item> &all_fields,
181
190
                                bool *all_order_by_fields_used);
182
191
bool eq_ref_table(JOIN *join, order_st *start_order, JoinTable *tab);
183
 
int join_tab_cmp(const void* ptr1, const void* ptr2);
184
192
int remove_dup_with_compare(Session *session, Table *table, Field **first_field, uint32_t offset, Item *having);
185
193
int remove_dup_with_hash_index(Session *session, 
186
194
                               Table *table,
196
204
                         COND_EQUAL *,
197
205
                         table_map normal_tables,
198
206
                         Select_Lex *select_lex,
199
 
                         std::vector<drizzled::optimizer::SargableParam> &sargables);
200
 
ha_rows get_quick_record_count(Session *session, drizzled::optimizer::SqlSelect *select, Table *table, const key_map *keys,ha_rows limit);
 
207
                         std::vector<optimizer::SargableParam> &sargables);
 
208
ha_rows get_quick_record_count(Session *session, optimizer::SqlSelect *select, Table *table, const key_map *keys,ha_rows limit);
201
209
void optimize_keyuse(JOIN *join, DYNAMIC_ARRAY *keyuse_array);
202
210
void add_group_and_distinct_keys(JOIN *join, JoinTable *join_tab);
203
211
void read_cached_record(JoinTable *tab);
212
220
void update_tmptable_sum_func(Item_sum **func,Table *tmp_table);
213
221
bool only_eq_ref_tables(JOIN *join, order_st *order, table_map tables);
214
222
bool create_ref_for_key(JOIN *join, JoinTable *j, 
215
 
                        drizzled::optimizer::KeyUse *org_keyuse, 
 
223
                        optimizer::KeyUse *org_keyuse, 
216
224
                        table_map used_tables);
217
225
 
 
226
} /* namespace drizzled */
 
227
 
 
228
/** @TODO why is this in the middle of the file??? */
 
229
 
218
230
#include "drizzled/stored_key.h"
219
231
 
 
232
namespace drizzled
 
233
{
 
234
 
220
235
bool cp_buffer_from_ref(Session *session, table_reference_st *ref);
221
236
int safe_index_read(JoinTable *tab);
222
237
COND *remove_eq_conds(Session *session, COND *cond, Item::cond_result *cond_value);
225
240
void print_join(Session *session, String *str,
226
241
                List<TableList> *tables, enum_query_type);
227
242
 
 
243
} /* namespace drizzled */
 
244
 
228
245
#endif /* DRIZZLED_SQL_SELECT_H */