~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/nested_join.h

  • Committer: Mark Atwood
  • Date: 2008-10-16 11:33:16 UTC
  • mto: (520.1.13 drizzle)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: mark@fallenpegasus.com-20081016113316-ff6jdt31ck90sjdh
an implemention of the errmsg plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2008 Sun Microsystems
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; version 2 of the License.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 */
 
19
 
 
20
#ifndef DRIZZLED_NESTED_JOIN_H
 
21
#define DRIZZLED_NESTED_JOIN_H
 
22
 
 
23
struct nested_join_st
 
24
{
 
25
  List<TableList>  join_list;       /* list of elements in the nested join */
 
26
  table_map         used_tables;     /* bitmap of tables in the nested join */
 
27
  table_map         not_null_tables; /* tables that rejects nulls           */
 
28
  struct st_join_table *first_nested;/* the first nested table in the plan  */
 
29
  /* 
 
30
    Used to count tables in the nested join in 2 isolated places:
 
31
    1. In make_outerjoin_info(). 
 
32
    2. check_interleaving_with_nj/restore_prev_nj_state (these are called
 
33
       by the join optimizer. 
 
34
    Before each use the counters are zeroed by reset_nj_counters.
 
35
  */
 
36
  uint32_t              counter_;
 
37
  nested_join_map   nj_map;          /* Bit used to identify this nested join*/
 
38
  /*
 
39
    (Valid only for semi-join nests) Bitmap of tables outside the semi-join
 
40
    that are used within the semi-join's ON condition.
 
41
  */
 
42
  table_map         sj_depends_on;
 
43
  /* Outer non-trivially correlated tables */
 
44
  table_map         sj_corr_tables;
 
45
  List<Item>        sj_outer_expr_list;
 
46
};
 
47
 
 
48
#endif /* DRIZZLED_NESTED_JOIN_H */