~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/subselect.h

  • Committer: Monty Taylor
  • Date: 2009-04-14 19:16:51 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 994.
  • Revision ID: mordred@inaugust.com-20090414191651-ltbww6hpqks8k7qk
Clarified instructions in README.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
/* subselect Item */
24
24
 
25
25
 
26
 
#include "drizzled/comp_creator.h"
27
 
#include "drizzled/item/ref.h"
28
 
#include "drizzled/item/field.h"
29
 
#include "drizzled/item/bin_string.h"
30
 
 
31
 
namespace drizzled
32
 
{
 
26
#include <drizzled/comp_creator.h>
 
27
#include <drizzled/item/ref.h>
 
28
#include <drizzled/item/field.h>
33
29
 
34
30
class Select_Lex;
35
31
class Select_Lex_Unit;
55
51
  /* substitution instead of subselect in case of optimization */
56
52
  Item *substitution;
57
53
  /* unit of subquery */
 
54
public:
58
55
  Select_Lex_Unit *unit;
59
56
protected:
60
57
  /* engine that perform execution of subselect (single select or union) */
335
332
 
336
333
  Item_in_subselect(Item * left_expr, Select_Lex *select_lex);
337
334
  Item_in_subselect()
338
 
    :
339
 
      Item_exists_subselect(),
340
 
      left_expr(NULL),
341
 
      left_expr_cache(NULL),
342
 
      first_execution(true),
343
 
      optimizer(NULL),
344
 
      abort_on_null(false),
345
 
      pushed_cond_guards(NULL),
346
 
      sj_convert_priority(0),
347
 
      expr_join_nest(NULL),
348
 
      exec_method(NOT_TRANSFORMED),
349
 
      upper_item(NULL)
 
335
    :Item_exists_subselect(), left_expr_cache(0), first_execution(true),
 
336
    optimizer(0), abort_on_null(0), pushed_cond_guards(NULL),
 
337
    exec_method(NOT_TRANSFORMED), upper_item(0)
350
338
  {}
351
339
  void cleanup();
352
340
  subs_type substype() { return IN_SUBS; }
405
393
};
406
394
 
407
395
 
408
 
class subselect_engine: public memory::SqlAlloc
 
396
class subselect_engine: public Sql_alloc
409
397
{
410
398
protected:
411
399
  select_result_interceptor *result; /* results storage class */
421
409
                         INDEXSUBQUERY_ENGINE, HASH_SJ_ENGINE};
422
410
 
423
411
  subselect_engine(Item_subselect *si, select_result_interceptor *res)
424
 
    :session(NULL)
 
412
    :session(0)
425
413
  {
426
414
    result= res;
427
415
    item= si;
539
527
};
540
528
 
541
529
 
542
 
class JoinTable;
 
530
struct st_join_table;
543
531
 
544
532
 
545
533
/*
562
550
class subselect_uniquesubquery_engine: public subselect_engine
563
551
{
564
552
protected:
565
 
  JoinTable *tab;
 
553
  st_join_table *tab;
566
554
  Item *cond; /* The WHERE condition of subselect */
567
555
  /*
568
556
    TRUE<=> last execution produced empty set. Valid only when left
573
561
public:
574
562
 
575
563
  // constructor can assign Session because it will be called after JOIN::prepare
576
 
  subselect_uniquesubquery_engine(Session *session_arg, JoinTable *tab_arg,
 
564
  subselect_uniquesubquery_engine(Session *session_arg, st_join_table *tab_arg,
577
565
                                  Item_subselect *subs, Item *where)
578
566
    :subselect_engine(subs, 0), tab(tab_arg), cond(where)
579
567
  {
634
622
public:
635
623
 
636
624
  // constructor can assign Session because it will be called after JOIN::prepare
637
 
  subselect_indexsubquery_engine(Session *session_arg, JoinTable *tab_arg,
 
625
  subselect_indexsubquery_engine(Session *session_arg, st_join_table *tab_arg,
638
626
                                 Item_subselect *subs, Item *where,
639
627
                                 Item *having_arg, bool chk_null)
640
628
    :subselect_uniquesubquery_engine(session_arg, tab_arg, subs, where),
707
695
  virtual enum_engine_type engine_type() { return HASH_SJ_ENGINE; }
708
696
};
709
697
 
710
 
} /* namespace drizzled */
711
 
 
712
698
#endif /* DRIZZLED_ITEM_SUBSELECT_H */