~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/range.h

Fixed the clock_gettime test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
#include <queue>
29
29
 
30
 
namespace drizzled
31
 
{
32
 
 
33
 
class Join;
34
 
class RorIntersectReadPlan; 
 
30
class JOIN;
 
31
class TRP_ROR_INTERSECT; 
35
32
typedef class Item COND;
36
 
 
37
 
namespace internal
38
 
{
39
33
typedef struct st_io_cache IO_CACHE;
40
 
}
 
34
 
 
35
typedef struct st_handler_buffer HANDLER_BUFFER;
41
36
 
42
37
typedef struct st_key_part
43
38
{
44
39
  uint16_t key;
45
40
  uint16_t part;
46
 
  /* See KeyPartInfo for meaning of the next two: */
 
41
  /* See KEY_PART_INFO for meaning of the next two: */
47
42
  uint16_t store_length;
48
43
  uint16_t length;
49
44
  uint8_t null_bit;
56
51
} KEY_PART;
57
52
 
58
53
 
 
54
namespace drizzled
 
55
{
 
56
 
59
57
namespace optimizer
60
58
{
61
59
 
256
254
   * Returns true if any index used by this quick select
257
255
   * uses field which is marked in passed bitmap.
258
256
   */
259
 
  virtual bool is_keys_used(const boost::dynamic_bitset<>& fields);
 
257
  virtual bool is_keys_used(const MyBitmap *fields);
260
258
};
261
259
 
262
260
struct st_qsel_param;
286
284
 * The QuickSelectInterface member variable is the implementor
287
285
 * of the SELECT execution.
288
286
 */
289
 
class SqlSelect : public memory::SqlAlloc 
 
287
class SqlSelect : public drizzled::memory::SqlAlloc 
290
288
{
291
289
 public:
292
290
  QuickSelectInterface *quick; /**< If quick-select used */
293
291
  COND *cond; /**< where condition */
294
292
  Table *head;
295
 
  internal::IO_CACHE *file; /**< Positions to used records */
 
293
  IO_CACHE *file; /**< Positions to used records */
296
294
  ha_rows records; /**< Records in use if read from file */
297
295
  double read_time; /**< Time to read rows */
298
296
  key_map quick_keys; /**< Possible quick keys */
331
329
  NOTES
332
330
    The caller must call QUICK_SELECT::init for returned quick select.
333
331
 
334
 
    CAUTION! This function may change session->mem_root to a memory::Root which will be
 
332
    CAUTION! This function may change session->mem_root to a drizzled::memory::Root which will be
335
333
    deallocated when the returned quick select is deleted.
336
334
 
337
335
  RETURN
343
341
                                   SEL_ARG *key_tree, 
344
342
                                   uint32_t mrr_flags,
345
343
                                   uint32_t mrr_buf_size, 
346
 
                                   memory::Root *alloc);
 
344
                                   drizzled::memory::Root *alloc);
347
345
 
348
 
uint32_t get_index_for_order(Table *table, Order *order, ha_rows limit);
 
346
uint32_t get_index_for_order(Table *table, order_st *order, ha_rows limit);
349
347
 
350
348
SqlSelect *make_select(Table *head, 
351
349
                       table_map const_tables,