~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join_table.h

  • Committer: Brian Aker
  • Date: 2009-07-09 21:14:05 UTC
  • mto: (1090.1.1 staging)
  • mto: This revision was merged to the branch mainline in revision 1091.
  • Revision ID: brian@gaz-20090709211405-jgl2txbaijtq62a7
Remove of JOIN_TAB to JoinTable

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
/**
22
22
 * @file
23
23
 *
24
 
 * Defines the JOIN_TAB class which is the primary class
 
24
 * Defines the JoinTable class which is the primary class
25
25
 * used in the nested loops join implementation.
26
26
 */
27
27
 
28
 
#ifndef DRIZZLED_JOIN_TAB_H
29
 
#define DRIZZLED_JOIN_TAB_H
 
28
#ifndef DRIZZLED_JOINTABLE_H
 
29
#define DRIZZLED_JOINTABLE_H
30
30
 
31
 
/* Values for JOIN_TAB::packed_info */
 
31
/* Values for JoinTable::packed_info */
32
32
#define TAB_INFO_HAVE_VALUE 1
33
33
#define TAB_INFO_USING_INDEX 2
34
34
#define TAB_INFO_USING_WHERE 4
35
35
#define TAB_INFO_FULL_SCAN_ON_NULL 8
36
36
 
37
 
typedef struct st_join_table 
 
37
class JoinTable 
38
38
{
39
 
  st_join_table() {} /* Remove gcc warning */
 
39
public:
 
40
  JoinTable() {} /* Remove gcc warning */
40
41
  Table *table;
41
42
  KEYUSE *keyuse; /**< pointer to first used key */
42
43
  SQL_SELECT *select;
52
53
  Item *pre_idx_push_select_cond;
53
54
  Item **on_expr_ref;   /**< pointer to the associated on expression   */
54
55
  COND_EQUAL *cond_equal;    /**< multiple equalities for the on expression */
55
 
  st_join_table *first_inner;   /**< first inner table for including outerjoin */
 
56
  JoinTable *first_inner;   /**< first inner table for including outerjoin */
56
57
  bool found;         /**< true after all matches or null complement */
57
58
  bool not_null_compl;/**< true before null complement is added      */
58
 
  st_join_table *last_inner;    /**< last table table for embedding outer join */
59
 
  st_join_table *first_upper;  /**< first inner table for embedding outer join */
60
 
  st_join_table *first_unmatched; /**< used for optimization purposes only     */
 
59
  JoinTable *last_inner;    /**< last table table for embedding outer join */
 
60
  JoinTable *first_upper;  /**< first inner table for embedding outer join */
 
61
  JoinTable *first_unmatched; /**< used for optimization purposes only     */
61
62
 
62
63
  /* Special content for EXPLAIN 'Extra' column or NULL if none */
63
64
  const char *info;
130
131
  /** Variables for semi-join duplicate elimination */
131
132
  SJ_TMP_TABLE *flush_weedout_table;
132
133
  SJ_TMP_TABLE *check_weed_out_table;
133
 
  struct st_join_table *do_firstmatch;
 
134
  JoinTable *do_firstmatch;
134
135
 
135
136
  /**
136
137
     ptr  - this join tab should do an InsideOut scan. Points
138
139
 
139
140
     NULL - Not an insideout scan.
140
141
  */
141
 
  struct st_join_table *insideout_match_tab;
 
142
  JoinTable *insideout_match_tab;
142
143
  unsigned char *insideout_buf; /**< Buffer to save index tuple to be able to skip dups */
143
144
 
144
145
  /** Used by InsideOut scan. Just set to true when have found a row. */
169
170
            (select->quick->get_type() ==
170
171
             QUICK_SELECT_I::QS_TYPE_GROUP_MIN_MAX));
171
172
  }
172
 
} JOIN_TAB;
 
173
};
173
174
 
174
 
#endif /* DRIZZLED_JOIN_TAB_H */
 
175
#endif /* DRIZZLED_JOINTABLE_H */