~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.h

  • Committer: Brian Aker
  • Date: 2010-05-19 00:35:41 UTC
  • mto: This revision was merged to the branch mainline in revision 1542.
  • Revision ID: brian@gaz-20100519003541-7ecxcuwv9klvzi8l
JOIN -> Join rename

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
#define KEY_OPTIMIZE_EXISTS             1
50
50
#define KEY_OPTIMIZE_REF_OR_NULL        2
51
51
 
52
 
class JOIN;
 
52
class Join;
53
53
 
54
 
enum_nested_loop_state sub_select_cache(JOIN *join, JoinTable *join_tab, bool end_of_records);
55
 
enum_nested_loop_state sub_select(JOIN *join,JoinTable *join_tab, bool end_of_records);
56
 
enum_nested_loop_state end_send_group(JOIN *join, JoinTable *join_tab, bool end_of_records);
57
 
enum_nested_loop_state end_write_group(JOIN *join, JoinTable *join_tab, bool end_of_records);
 
54
enum_nested_loop_state sub_select_cache(Join *join, JoinTable *join_tab, bool end_of_records);
 
55
enum_nested_loop_state sub_select(Join *join,JoinTable *join_tab, bool end_of_records);
 
56
enum_nested_loop_state end_send_group(Join *join, JoinTable *join_tab, bool end_of_records);
 
57
enum_nested_loop_state end_write_group(Join *join, JoinTable *join_tab, bool end_of_records);
58
58
 
59
59
typedef struct st_rollup
60
60
{
88
88
  COND_CMP(Item *a,Item_func *b) :and_level(a),cmp_func(b) {}
89
89
};
90
90
 
91
 
void TEST_join(JOIN *join);
 
91
void TEST_join(Join *join);
92
92
 
93
93
/* Extern functions in sql_select.cc */
94
94
bool store_val_in_field(Field *field, Item *val, enum_check_fields check_flag);
108
108
                                   const char *name, Table *table,
109
109
                                   Item_field *item, uint32_t convert_blob_length);
110
110
bool test_if_ref(Item_field *left_item,Item *right_item);
111
 
COND *optimize_cond(JOIN *join, COND *conds, List<TableList> *join_list, Item::cond_result *cond_value);
 
111
COND *optimize_cond(Join *join, COND *conds, List<TableList> *join_list, Item::cond_result *cond_value);
112
112
COND *make_cond_for_table(COND *cond,table_map table, table_map used_table, bool exclude_expensive_cond);
113
113
COND* substitute_for_best_equal_field(COND *cond, COND_EQUAL *cond_equal, void *table_join_idx);
114
114
bool list_contains_unique_index(Table *table, bool (*find_func) (Field *, void *), void *data);
128
128
                                                List<Item> &res_all_fields,
129
129
                                                uint32_t elements,
130
130
                              List<Item> &all_fields);
131
 
int do_select(JOIN *join, List<Item> *fields, Table *tmp_table);
 
131
int do_select(Join *join, List<Item> *fields, Table *tmp_table);
132
132
bool const_expression_in_where(COND *conds,Item *item, Item **comp_item);
133
 
int create_sort_index(Session *session, JOIN *join, order_st *order, ha_rows filesort_limit, ha_rows select_limit, bool is_order_by);
 
133
int create_sort_index(Session *session, Join *join, order_st *order, ha_rows filesort_limit, ha_rows select_limit, bool is_order_by);
134
134
void save_index_subquery_explain_info(JoinTable *join_tab, Item* where);
135
135
Item *remove_additional_cond(Item* conds);
136
136
bool setup_sum_funcs(Session *session, Item_sum **func_ptr);
178
178
int join_tab_cmp(const void* ptr1, const void* ptr2);
179
179
int join_tab_cmp_straight(const void* ptr1, const void* ptr2);
180
180
void push_index_cond(JoinTable *tab, uint32_t keyno, bool other_tbls_ok);
181
 
void add_not_null_conds(JOIN *join);
 
181
void add_not_null_conds(Join *join);
182
182
uint32_t max_part_bit(key_part_map bits);
183
183
COND *add_found_match_trig_cond(JoinTable *tab, COND *cond, JoinTable *root_tab);
184
184
order_st *create_distinct_group(Session *session,
187
187
                                List<Item> &fields,
188
188
                                List<Item> &all_fields,
189
189
                                bool *all_order_by_fields_used);
190
 
bool eq_ref_table(JOIN *join, order_st *start_order, JoinTable *tab);
 
190
bool eq_ref_table(Join *join, order_st *start_order, JoinTable *tab);
191
191
int remove_dup_with_compare(Session *session, Table *table, Field **first_field, uint32_t offset, Item *having);
192
192
int remove_dup_with_hash_index(Session *session, 
193
193
                               Table *table,
205
205
                         Select_Lex *select_lex,
206
206
                         std::vector<optimizer::SargableParam> &sargables);
207
207
ha_rows get_quick_record_count(Session *session, optimizer::SqlSelect *select, Table *table, const key_map *keys,ha_rows limit);
208
 
void optimize_keyuse(JOIN *join, DYNAMIC_ARRAY *keyuse_array);
209
 
void add_group_and_distinct_keys(JOIN *join, JoinTable *join_tab);
 
208
void optimize_keyuse(Join *join, DYNAMIC_ARRAY *keyuse_array);
 
209
void add_group_and_distinct_keys(Join *join, JoinTable *join_tab);
210
210
void read_cached_record(JoinTable *tab);
211
211
bool mysql_select(Session *session, Item ***rref_pointer_array,
212
212
                  TableList *tables, uint32_t wild_num,  List<Item> &list,
217
217
// Create list for using with tempory table
218
218
void init_tmptable_sum_functions(Item_sum **func);
219
219
void update_tmptable_sum_func(Item_sum **func,Table *tmp_table);
220
 
bool only_eq_ref_tables(JOIN *join, order_st *order, table_map tables);
221
 
bool create_ref_for_key(JOIN *join, JoinTable *j, 
 
220
bool only_eq_ref_tables(Join *join, order_st *order, table_map tables);
 
221
bool create_ref_for_key(Join *join, JoinTable *j, 
222
222
                        optimizer::KeyUse *org_keyuse, 
223
223
                        table_map used_tables);
224
224