~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_list.h

  • Committer: Brian Aker
  • Date: 2008-08-19 15:11:04 UTC
  • mfrom: (327.2.6 drizzle-good)
  • Revision ID: brian@gir.tangent.org-20080819151104-uxk5lgoaj0fwgx9z
Merge of Brian's tree to main tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
};
29
29
 
30
30
 
31
 
class TABLE_LIST
 
31
class TableList
32
32
{
33
33
public:
34
 
  TABLE_LIST() {}                          /* Remove gcc warning */
 
34
  TableList() {}                          /* Remove gcc warning */
35
35
 
36
36
  /**
37
 
    Prepare TABLE_LIST that consists of one table instance to use in
 
37
    Prepare TableList that consists of one table instance to use in
38
38
    simple_open_and_lock_tables
39
39
  */
40
40
  inline void init_one_table(const char *db_name_arg,
52
52
    views as leaves (unlike 'next_leaf' below). Created at parse time
53
53
    in st_select_lex::add_table_to_list() -> table_list.link_in_list().
54
54
  */
55
 
  TABLE_LIST *next_local;
 
55
  TableList *next_local;
56
56
  /* link in a global list of all queries tables */
57
 
  TABLE_LIST *next_global, **prev_global;
 
57
  TableList *next_global, **prev_global;
58
58
  char          *db, *alias, *table_name, *schema_table_name;
59
59
  char          *option;                /* Used by cache index  */
60
60
  Item          *on_expr;               /* Used with outer join */
84
84
    'this' represents a NATURAL or USING join operation. Thus after
85
85
    parsing 'this' is a NATURAL/USING join iff (natural_join != NULL).
86
86
  */
87
 
  TABLE_LIST *natural_join;
 
87
  TableList *natural_join;
88
88
  /*
89
89
    True if 'this' represents a nested join that is a NATURAL JOIN.
90
90
    For one of the operands of 'this', the member 'natural_join' points
105
105
    List of nodes in a nested join tree, that should be considered as
106
106
    leaves with respect to name resolution. The leaves are: views,
107
107
    top-most nodes representing NATURAL/USING joins, subqueries, and
108
 
    base tables. All of these TABLE_LIST instances contain a
 
108
    base tables. All of these TableList instances contain a
109
109
    materialized list of columns. The list is local to a subquery.
110
110
  */
111
 
  TABLE_LIST *next_name_resolution_table;
 
111
  TableList *next_name_resolution_table;
112
112
  /* Index names in a "... JOIN ... USE/IGNORE INDEX ..." clause. */
113
113
  List<Index_hint> *index_hints;
114
114
  Table        *table;    /* opened table */
125
125
    here it will be reference of first occurrence of t1 to second (as you
126
126
    can see this lists can't be merged)
127
127
  */
128
 
  TABLE_LIST    *correspondent_table;
 
128
  TableList     *correspondent_table;
129
129
  st_select_lex_unit *derived;          /* SELECT_LEX_UNIT of derived table */
130
130
  ST_SCHEMA_TABLE *schema_table;        /* Information_schema table */
131
131
  st_select_lex *schema_select_lex;
145
145
    does not include the tables of subqueries used in the view. Is set only
146
146
    for merged views.
147
147
  */
148
 
  TABLE_LIST    *merge_underlying_list;
 
148
  TableList     *merge_underlying_list;
149
149
  /*
150
150
    List of all base tables local to a subquery including all view
151
151
    tables. Unlike 'next_local', this in this list views are *not*
152
152
    leaves. Created in setup_tables() -> make_leaves_list().
153
153
  */
154
 
  TABLE_LIST    *next_leaf;
 
154
  TableList     *next_leaf;
155
155
  thr_lock_type lock_type;
156
156
  uint          outer_join;             /* Which join type */
157
157
  uint          shared;                 /* Used in multi-upd */
163
163
  bool          ignore_leaves;          /* preload only non-leaf nodes */
164
164
  table_map     dep_tables;             /* tables the table depends on      */
165
165
  table_map     on_expr_dep_tables;     /* tables on expression depends on  */
166
 
  struct st_nested_join *nested_join;   /* if the element is a nested join  */
167
 
  TABLE_LIST *embedding;             /* nested join containing the table */
168
 
  List<TABLE_LIST> *join_list;/* join list the table belongs to   */
 
166
  nested_join_st *nested_join;   /* if the element is a nested join  */
 
167
  TableList *embedding;             /* nested join containing the table */
 
168
  List<TableList> *join_list;/* join list the table belongs to   */
169
169
  bool          cacheable_table;        /* stop PS caching */
170
170
  handlerton    *db_type;               /* table_type for handler */
171
171
  char          timestamp_buffer[20];   /* buffer for timestamp (19+1) */
172
172
  /*
173
 
    This TABLE_LIST object corresponds to the table to be created
 
173
    This TableList object corresponds to the table to be created
174
174
    so it is possible that it does not exist (used in CREATE TABLE
175
175
    ... SELECT implementation).
176
176
  */
204
204
  }
205
205
  void print(THD *thd, String *str, enum_query_type query_type);
206
206
  bool set_insert_values(MEM_ROOT *mem_root);
207
 
  TABLE_LIST *find_underlying_table(Table *table);
208
 
  TABLE_LIST *first_leaf_for_name_resolution();
209
 
  TABLE_LIST *last_leaf_for_name_resolution();
 
207
  TableList *find_underlying_table(Table *table);
 
208
  TableList *first_leaf_for_name_resolution();
 
209
  TableList *last_leaf_for_name_resolution();
210
210
  bool is_leaf_for_name_resolution();
211
 
  inline TABLE_LIST *top_table()
 
211
  inline TableList *top_table()
212
212
    { return this; }
213
213
 
214
214
  /*