~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/nested_join.h

  • Committer: Monty Taylor
  • Date: 2008-11-16 05:36:13 UTC
  • mto: (584.1.9 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081116053613-bld4rqxhlkb49c02
Split out cache_row and type_holder.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
20
20
#ifndef DRIZZLED_NESTED_JOIN_H
21
21
#define DRIZZLED_NESTED_JOIN_H
22
22
 
 
23
#include <drizzled/sql_list.h>
 
24
#include <drizzled/sql_bitmap.h>
23
25
#include <drizzled/item.h>
24
 
#include <drizzled/lex_string.h>
25
 
#include <drizzled/sql_list.h>
26
 
 
27
 
#include <bitset>
28
 
 
29
 
namespace drizzled
30
 
{
31
 
class TableList;
32
 
class JoinTable;
33
 
 
34
 
class NestedJoin
35
 
{
36
 
public:
 
26
#include <drizzled/table_list.h>
 
27
 
 
28
struct nested_join_st
 
29
{
37
30
  /* list of elements in the nested join */
38
31
  List<TableList> join_list;
39
32
 
44
37
  table_map not_null_tables;
45
38
 
46
39
  /* the first nested table in the plan  */
47
 
  JoinTable *first_nested;
 
40
  struct st_join_table *first_nested;
48
41
 
49
42
  /*
50
43
    Used to count tables in the nested join in 2 isolated places:
56
49
  uint32_t counter_;
57
50
 
58
51
  /* Bit used to identify this nested join*/
59
 
  std::bitset<64> nj_map;
 
52
  nested_join_map nj_map;
60
53
 
61
54
  /*
62
55
    (Valid only for semi-join nests) Bitmap of tables outside the semi-join
67
60
  table_map sj_corr_tables;
68
61
 
69
62
  List<Item> sj_outer_expr_list;
70
 
 
71
 
  /**
72
 
     True if this join nest node is completely covered by the query execution
73
 
     plan. This means two things.
74
 
 
75
 
     1. All tables on its @c join_list are covered by the plan.
76
 
 
77
 
     2. All child join nest nodes are fully covered.
78
 
   */
79
 
  bool is_fully_covered() const { return join_list.elements == counter_; }
80
63
};
81
64
 
82
 
} /* namespace drizzled */
83
 
 
84
65
#endif /* DRIZZLED_NESTED_JOIN_H */