~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join.h

  • Committer: Brian Aker
  • Date: 2010-12-02 05:20:13 UTC
  • mto: This revision was merged to the branch mainline in revision 1968.
  • Revision ID: brian@tangent.org-20101202052013-idifz62qat1ayhsn
Style change around session list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
/**
22
22
 * @file
23
23
 *
24
 
 * Defines the JOIN class
 
24
 * Defines the Join class
25
25
 */
26
26
 
27
27
#ifndef DRIZZLED_JOIN_H
34
34
namespace drizzled
35
35
{
36
36
 
37
 
class JOIN :public memory::SqlAlloc
 
37
class Join :public memory::SqlAlloc
38
38
{
39
 
  JOIN(const JOIN &rhs);                        /**< not implemented */
40
 
  JOIN& operator=(const JOIN &rhs);             /**< not implemented */
 
39
  Join(const Join &rhs);                        /**< not implemented */
 
40
  Join& operator=(const Join &rhs);             /**< not implemented */
41
41
 
42
42
  /**
43
43
   * Contains a partial query execution plan which is extended during
102
102
 
103
103
  /*
104
104
    simple_xxxxx is set if order_st/GROUP BY doesn't include any references
105
 
    to other tables than the first non-constant table in the JOIN.
 
105
    to other tables than the first non-constant table in the Join.
106
106
    It's also set if order_st/GROUP BY is empty.
107
107
  */
108
108
  bool simple_order;
177
177
  uint64_t select_options;
178
178
  select_result *result;
179
179
  Tmp_Table_Param tmp_table_param;
180
 
  DRIZZLE_LOCK *lock;
 
180
  DrizzleLock *lock;
181
181
 
182
 
  JOIN *tmp_join; /**< copy of this JOIN to be used with temporary tables */
 
182
  Join *tmp_join; /**< copy of this Join to be used with temporary tables */
183
183
  ROLLUP rollup;                                /**< Used with rollup */
184
184
  DYNAMIC_ARRAY keyuse;
185
185
  Item::cond_result cond_value;
195
195
  List<Item> tmp_fields_list3;
196
196
  int error;
197
197
 
198
 
  order_st *order;
199
 
  order_st *group_list; /**< hold parameters of mysql_select */
 
198
  Order *order;
 
199
  Order *group_list; /**< hold parameters of mysql_select */
200
200
  COND *conds;                            // ---"---
201
201
  Item *conds_history; /**< store WHERE for explain */
202
202
  TableList *tables_list; /**< hold 'tables' parameter of mysql_select */
219
219
    allocations that occur in repetition at execution time will result in
220
220
    excessive memory usage.
221
221
  */
222
 
  SORT_FIELD *sortorder;                        // make_unireg_sortorder()
 
222
  SortField *sortorder;                        // make_unireg_sortorder()
223
223
  Table **table_reexec;                         // make_simple_join()
224
224
  JoinTable *join_tab_reexec;                    // make_simple_join()
225
225
  /* end of allocation caching storage */
226
226
 
227
227
  /** Constructors */
228
 
  JOIN(Session *session_arg, 
 
228
  Join(Session *session_arg, 
229
229
       List<Item> &fields_arg, 
230
230
       uint64_t select_options_arg,
231
231
       select_result *result_arg)
403
403
              uint32_t wind_num,
404
404
              COND *conds,
405
405
              uint32_t og_num,
406
 
              order_st *order,
407
 
              order_st *group,
 
406
              Order *order,
 
407
              Order *group,
408
408
              Item *having,
409
409
              Select_Lex *select,
410
410
              Select_Lex_Unit *unit);
446
446
    memory consumption.
447
447
  */
448
448
  void join_free();
449
 
  /** Cleanup this JOIN, possibly for reuse */
 
449
  /** Cleanup this Join, possibly for reuse */
450
450
  void cleanup(bool full);
451
451
  void clear();
452
452
  bool save_join_tab();
525
525
 
526
526
};
527
527
 
528
 
enum_nested_loop_state evaluate_join_record(JOIN *join, JoinTable *join_tab, int error);
529
 
enum_nested_loop_state evaluate_null_complemented_join_record(JOIN *join, JoinTable *join_tab);
530
 
enum_nested_loop_state flush_cached_records(JOIN *join, JoinTable *join_tab, bool skip_last);
531
 
enum_nested_loop_state end_send(JOIN *join, JoinTable *join_tab, bool end_of_records);
532
 
enum_nested_loop_state end_write(JOIN *join, JoinTable *join_tab, bool end_of_records);
533
 
enum_nested_loop_state end_update(JOIN *join, JoinTable *join_tab, bool end_of_records);
534
 
enum_nested_loop_state end_unique_update(JOIN *join, JoinTable *join_tab, bool end_of_records);
 
528
enum_nested_loop_state evaluate_join_record(Join *join, JoinTable *join_tab, int error);
 
529
enum_nested_loop_state evaluate_null_complemented_join_record(Join *join, JoinTable *join_tab);
 
530
enum_nested_loop_state flush_cached_records(Join *join, JoinTable *join_tab, bool skip_last);
 
531
enum_nested_loop_state end_send(Join *join, JoinTable *join_tab, bool end_of_records);
 
532
enum_nested_loop_state end_write(Join *join, JoinTable *join_tab, bool end_of_records);
 
533
enum_nested_loop_state end_update(Join *join, JoinTable *join_tab, bool end_of_records);
 
534
enum_nested_loop_state end_unique_update(Join *join, JoinTable *join_tab, bool end_of_records);
535
535
 
536
536
} /* namespace drizzled */
537
537