~posulliv/drizzle/memcached_applier

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.h

  • Committer: Brian Aker
  • Date: 2009-02-07 22:33:25 UTC
  • Revision ID: brian@tangent.org-20090207223325-5ipgldvw1pkghboq
typdef class removal (just... use the name of the class).

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
 
265
265
/*
266
266
    Base class for Select_Lex (Select_Lex) &
267
 
    Select_Lex_unit (Select_Lex_UNIT)
 
267
    Select_Lex_Unit (Select_Lex_Unit)
268
268
*/
269
269
class LEX;
270
270
class Select_Lex;
271
 
class Select_Lex_unit;
 
271
class Select_Lex_Unit;
272
272
class Select_Lex_Node {
273
273
protected:
274
274
  Select_Lex_Node *next, **prev,   /* neighbor list */
312
312
  void include_global(Select_Lex_Node **plink);
313
313
  void exclude();
314
314
 
315
 
  virtual Select_Lex_unit* master_unit()= 0;
 
315
  virtual Select_Lex_Unit* master_unit()= 0;
316
316
  virtual Select_Lex* outer_select()= 0;
317
317
  virtual Select_Lex* return_after_parsing()= 0;
318
318
 
331
331
  virtual void set_lock_for_tables(thr_lock_type)
332
332
  {}
333
333
 
334
 
  friend class Select_Lex_unit;
 
334
  friend class Select_Lex_Unit;
335
335
  friend bool mysql_new_select(LEX *lex, bool move_down);
336
336
private:
337
337
  void fast_exclude();
338
338
};
339
339
 
340
340
/*
341
 
   Select_Lex_UNIT - unit of selects (UNION, INTERSECT, ...) group
 
341
   Select_Lex_Unit - unit of selects (UNION, INTERSECT, ...) group
342
342
   Select_Lexs
343
343
*/
344
344
class Session;
345
345
class select_result;
346
346
class JOIN;
347
347
class select_union;
348
 
class Select_Lex_unit: public Select_Lex_Node {
 
348
class Select_Lex_Unit: public Select_Lex_Node {
349
349
protected:
350
350
  TableList result_table_list;
351
351
  select_union *union_result;
398
398
  bool describe; /* union exec() called for EXPLAIN */
399
399
 
400
400
  void init_query();
401
 
  Select_Lex_unit* master_unit();
 
401
  Select_Lex_Unit* master_unit();
402
402
  Select_Lex* outer_select();
403
403
  Select_Lex* first_select()
404
404
  {
405
405
    return reinterpret_cast<Select_Lex*>(slave);
406
406
  }
407
 
  Select_Lex_unit* next_unit()
 
407
  Select_Lex_Unit* next_unit()
408
408
  {
409
 
    return reinterpret_cast<Select_Lex_unit*>(next);
 
409
    return reinterpret_cast<Select_Lex_Unit*>(next);
410
410
  }
411
411
  Select_Lex* return_after_parsing() { return return_to; }
412
412
  void exclude_level();
435
435
  List<Item> *get_unit_column_types();
436
436
};
437
437
 
438
 
typedef class Select_Lex_unit Select_Lex_UNIT;
439
 
 
440
438
/*
441
439
  Select_Lex - store information of parsed SELECT statment
442
440
*/
558
556
  uint8_t full_group_by_flag;
559
557
  void init_query();
560
558
  void init_select();
561
 
  Select_Lex_unit* master_unit();
562
 
  Select_Lex_unit* first_inner_unit()
 
559
  Select_Lex_Unit* master_unit();
 
560
  Select_Lex_Unit* first_inner_unit()
563
561
  {
564
 
    return (Select_Lex_unit*) slave;
 
562
    return (Select_Lex_Unit*) slave;
565
563
  }
566
564
  Select_Lex* outer_select();
567
565
  Select_Lex* next_select() { return (Select_Lex*) next; }
612
610
    This method created for reiniting LEX in mysql_admin_table() and can be
613
611
    used only if you are going remove all Select_Lex & units except belonger
614
612
    to LEX (LEX::unit & LEX::select, for other purposes there are
615
 
    Select_Lex_UNIT::exclude_level & Select_Lex_UNIT::exclude_tree
 
613
    Select_Lex_Unit::exclude_level & Select_Lex_Unit::exclude_tree
616
614
  */
617
615
  void cut_subtree() { slave= 0; }
618
616
  bool test_limit();
633
631
  void fix_prepare_information(Session *session, Item **conds, Item **having_conds);
634
632
  /*
635
633
    Destroy the used execution plan (JOIN) of this subtree (this
636
 
    Select_Lex and all nested Select_Lexes and Select_Lex_UNITs).
 
634
    Select_Lex and all nested Select_Lexes and Select_Lex_Units).
637
635
  */
638
636
  bool cleanup();
639
637
  /*
670
668
  List<Index_hint> *index_hints;
671
669
};
672
670
 
673
 
inline bool Select_Lex_unit::is_union ()
 
671
inline bool Select_Lex_Unit::is_union ()
674
672
{
675
673
  return first_select()->next_select() &&
676
674
    first_select()->next_select()->linkage == UNION_TYPE;
1244
1242
class LEX : public Query_tables_list
1245
1243
{
1246
1244
public:
1247
 
  Select_Lex_UNIT unit;                         /* most upper unit */
 
1245
  Select_Lex_Unit unit;                         /* most upper unit */
1248
1246
  Select_Lex select_lex;                        /* first Select_Lex */
1249
1247
  /* current Select_Lex in parsing */
1250
1248
  Select_Lex *current_select;