~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/range.h

Merge Stewart.

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
22
22
#ifndef DRIZZLED_OPTIMIZER_RANGE_H
23
23
#define DRIZZLED_OPTIMIZER_RANGE_H
24
24
 
25
 
#include <drizzled/field.h>
26
 
#include <drizzled/item/sum.h>
27
 
#include <drizzled/table_reference.h>
 
25
#include "drizzled/field.h"
 
26
#include "drizzled/item/sum.h"
28
27
 
29
28
#include <queue>
30
29
 
31
 
#include <boost/dynamic_bitset.hpp>
32
 
 
33
30
namespace drizzled
34
31
{
35
32
 
36
 
class Join;
 
33
class JOIN;
37
34
class RorIntersectReadPlan; 
38
35
typedef class Item COND;
39
36
 
42
39
typedef struct st_io_cache IO_CACHE;
43
40
}
44
41
 
 
42
typedef struct st_handler_buffer HANDLER_BUFFER;
 
43
 
45
44
typedef struct st_key_part
46
45
{
47
46
  uint16_t key;
48
47
  uint16_t part;
49
 
  /* See KeyPartInfo for meaning of the next two: */
 
48
  /* See KEY_PART_INFO for meaning of the next two: */
50
49
  uint16_t store_length;
51
50
  uint16_t length;
52
51
  uint8_t null_bit;
259
258
   * Returns true if any index used by this quick select
260
259
   * uses field which is marked in passed bitmap.
261
260
   */
262
 
  virtual bool is_keys_used(const boost::dynamic_bitset<>& fields);
 
261
  virtual bool is_keys_used(const MyBitmap *fields);
263
262
};
264
263
 
265
264
struct st_qsel_param;
315
314
};
316
315
 
317
316
QuickRangeSelect *get_quick_select_for_ref(Session *session, 
318
 
                                           Table *table,
319
 
                                           table_reference_st *ref,
320
 
                                           ha_rows records);
 
317
                                             Table *table,
 
318
                                             struct table_reference_st *ref,
 
319
                                             ha_rows records);
321
320
 
322
321
/*
323
322
  Create a QuickRangeSelect from given key and SEL_ARG tree for that key.
348
347
                                   uint32_t mrr_buf_size, 
349
348
                                   memory::Root *alloc);
350
349
 
351
 
uint32_t get_index_for_order(Table *table, Order *order, ha_rows limit);
 
350
uint32_t get_index_for_order(Table *table, order_st *order, ha_rows limit);
352
351
 
353
352
SqlSelect *make_select(Table *head, 
354
353
                       table_map const_tables,