~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join_table.h

  • Committer: Djellel E. Difallah
  • Date: 2010-03-27 10:10:49 UTC
  • mto: This revision was merged to the branch mainline in revision 1429.
  • Revision ID: ded@ubuntu-20100327101049-oo3arvatjoyku124
merge my_decimal and decimal

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-2009 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008-2009 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
28
28
#ifndef DRIZZLED_JOIN_TABLE_H
29
29
#define DRIZZLED_JOIN_TABLE_H
30
30
 
31
 
#include <drizzled/enum_nested_loop_state.h>
32
 
#include <drizzled/table_reference.h>
33
 
#include <drizzled/optimizer/range.h>
34
 
#include <drizzled/join_cache.h>
35
 
#include <drizzled/optimizer/key_use.h>
36
 
 
37
 
#include <drizzled/records.h>
 
31
#include "drizzled/enum_nested_loop_state.h"
 
32
#include "drizzled/table_reference.h"
 
33
#include "drizzled/optimizer/range.h"
 
34
#include "drizzled/join_cache.h"
 
35
#include "drizzled/optimizer/key_use.h"
38
36
 
39
37
#include <bitset>
40
38
 
41
39
namespace drizzled
42
40
{
43
41
 
44
 
class Table;
45
 
 
46
 
namespace optimizer
47
 
{
48
 
  class Position;
49
 
}
50
42
/* Values for JoinTable::packed_info */
51
43
#define TAB_INFO_HAVE_VALUE 1
52
44
#define TAB_INFO_USING_INDEX 2
53
45
#define TAB_INFO_USING_WHERE 4
54
46
#define TAB_INFO_FULL_SCAN_ON_NULL 8
55
47
 
 
48
class Table;
 
49
 
 
50
 
56
51
/** Description of an access method */
57
52
enum access_method
58
53
154
149
 
155
150
  Read_record_func read_first_record;
156
151
  Next_select_func next_select;
157
 
  ReadRecord    read_record;
 
152
  READ_RECORD   read_record;
158
153
  /*
159
154
    Currently the following two fields are used only for a [NOT] IN subquery
160
155
    if it is executed by an alternative full table scan when the left operand of
161
156
    the subquery predicate is evaluated to NULL.
162
157
  */
163
158
  Read_record_func save_read_first_record; /**< to save read_first_record */
164
 
  int (*save_read_record) (ReadRecord *); /**< to save read_record.read_record */
 
159
  int (*save_read_record) (READ_RECORD *); /**< to save read_record.read_record */
165
160
  double worst_seeks;
166
161
  key_map       const_keys; /**< Keys with constant part */
167
162
  key_map       checked_keys; /**< Keys checked in find_best */
203
198
  */
204
199
  ha_rows limit;
205
200
  table_reference_st    ref;
206
 
  JoinCache cache;
207
 
  Join *join;
 
201
  JOIN_CACHE cache;
 
202
  JOIN *join;
208
203
 
209
204
  /**
210
205
     ptr  - this join tab should do an InsideOut scan. Points
246
241
  }
247
242
 
248
243
  void readCachedRecord();
249
 
  int joinReadConstTable(optimizer::Position *pos);
250
 
  int joinReadSystem();
251
244
};
252
245
 
253
246
} /* namespace drizzled */