1 #ifndef SQL_EXECUTOR_INCLUDED
2 #define SQL_EXECUTOR_INCLUDED
33 enum enum_nested_loop_state
39 NESTED_LOOP_KILLED= -2,
41 NESTED_LOOP_ERROR= -1,
48 NESTED_LOOP_QUERY_LIMIT= 3,
54 NESTED_LOOP_CURSOR_LIMIT= 4
58 typedef enum_nested_loop_state
109 bool have_confluent_row;
180 enum enum_op_type { OT_CACHE, OT_TMP_TABLE };
191 virtual enum_op_type type()= 0;
195 virtual int init() {
return 0; };
201 virtual enum_nested_loop_state
put_record()= 0;
205 virtual enum_nested_loop_state
end_send()= 0;
240 enum_op_type type() {
return OT_TMP_TABLE; }
253 write_func= new_write_func;
258 Next_select_func write_func;
259 enum_nested_loop_state
put_record(
bool end_of_records);
260 bool prepare_tmp_table();
267 enum_nested_loop_state end_send_group(
JOIN *join,
JOIN_TAB *join_tab,
268 bool end_of_records);
269 enum_nested_loop_state end_write_group(
JOIN *join,
JOIN_TAB *join_tab,
270 bool end_of_records);
273 enum_nested_loop_state
274 evaluate_join_record(
JOIN *join,
JOIN_TAB *join_tab,
int error);
286 SORT_FIELD * make_unireg_sortorder(
ORDER *order, uint *length,
287 SORT_FIELD *sortorder);
292 int join_init_quick_read_record(
JOIN_TAB *tab);
297 int join_materialize_derived(
JOIN_TAB *tab);
298 int join_materialize_semijoin(
JOIN_TAB *tab);
315 bool prepare_sum_aggregators(
Item_sum **func_ptr,
bool need_distinct);