~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/opt_range.h

  • Committer: Brian Aker
  • Date: 2008-10-20 03:40:03 UTC
  • mto: (492.3.21 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: brian@tangent.org-20081020034003-t2dcnl0ayr2ymm8k
THD -> Session rename

Show diffs side-by-side

added added

removed removed

Lines of Context:
314
314
public:
315
315
  MEM_ROOT alloc;
316
316
 
317
 
  QUICK_RANGE_SELECT(THD *thd, Table *table,uint32_t index_arg,bool no_alloc,
 
317
  QUICK_RANGE_SELECT(Session *thd, Table *table,uint32_t index_arg,bool no_alloc,
318
318
                     MEM_ROOT *parent_alloc, bool *create_err);
319
319
  ~QUICK_RANGE_SELECT();
320
320
 
347
347
  }
348
348
  friend class TRP_ROR_INTERSECT;
349
349
  friend
350
 
  QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, Table *table,
 
350
  QUICK_RANGE_SELECT *get_quick_select_for_ref(Session *thd, Table *table,
351
351
                                               struct st_table_ref *ref,
352
352
                                               ha_rows records);
353
353
  friend bool get_quick_keys(PARAM *param, QUICK_RANGE_SELECT *quick, 
433
433
class QUICK_INDEX_MERGE_SELECT : public QUICK_SELECT_I
434
434
{
435
435
public:
436
 
  QUICK_INDEX_MERGE_SELECT(THD *thd, Table *table);
 
436
  QUICK_INDEX_MERGE_SELECT(Session *thd, Table *table);
437
437
  ~QUICK_INDEX_MERGE_SELECT();
438
438
 
439
439
  int  init();
458
458
  bool  doing_pk_scan;
459
459
 
460
460
  MEM_ROOT alloc;
461
 
  THD *thd;
 
461
  Session *thd;
462
462
  int read_keys_and_merge();
463
463
 
464
464
  /* used to get rows collected in Unique */
487
487
class QUICK_ROR_INTERSECT_SELECT : public QUICK_SELECT_I
488
488
{
489
489
public:
490
 
  QUICK_ROR_INTERSECT_SELECT(THD *thd, Table *table,
 
490
  QUICK_ROR_INTERSECT_SELECT(Session *thd, Table *table,
491
491
                             bool retrieve_full_rows,
492
492
                             MEM_ROOT *parent_alloc);
493
493
  ~QUICK_ROR_INTERSECT_SELECT();
517
517
  QUICK_RANGE_SELECT *cpk_quick;
518
518
 
519
519
  MEM_ROOT alloc; /* Memory pool for this and merged quick selects data. */
520
 
  THD *thd;       /* current thread */
 
520
  Session *thd;       /* current thread */
521
521
  bool need_to_fetch_row; /* if true, do retrieve full table records. */
522
522
  /* in top-level quick select, true if merged scans where initialized */
523
523
  bool scans_inited; 
540
540
class QUICK_ROR_UNION_SELECT : public QUICK_SELECT_I
541
541
{
542
542
public:
543
 
  QUICK_ROR_UNION_SELECT(THD *thd, Table *table);
 
543
  QUICK_ROR_UNION_SELECT(Session *thd, Table *table);
544
544
  ~QUICK_ROR_UNION_SELECT();
545
545
 
546
546
  int  init();
560
560
  QUEUE queue;    /* Priority queue for merge operation */
561
561
  MEM_ROOT alloc; /* Memory pool for this and merged quick selects data. */
562
562
 
563
 
  THD *thd;             /* current thread */
 
563
  Session *thd;             /* current thread */
564
564
  unsigned char *cur_rowid;      /* buffer used in get_next() */
565
565
  unsigned char *prev_rowid;     /* rowid of last row returned by get_next() */
566
566
  bool have_prev_rowid; /* true if prev_rowid has valid data */
704
704
  SQL_SELECT();
705
705
  ~SQL_SELECT();
706
706
  void cleanup();
707
 
  bool check_quick(THD *thd, bool force_quick_range, ha_rows limit)
 
707
  bool check_quick(Session *thd, bool force_quick_range, ha_rows limit)
708
708
  {
709
709
    key_map tmp;
710
710
    tmp.set_all();
711
711
    return test_quick_select(thd, tmp, 0, limit, force_quick_range, false) < 0;
712
712
  }
713
713
  inline bool skip_record() { return cond ? cond->val_int() == 0 : 0; }
714
 
  int test_quick_select(THD *thd, key_map keys, table_map prev_tables,
 
714
  int test_quick_select(Session *thd, key_map keys, table_map prev_tables,
715
715
                        ha_rows limit, bool force_quick_range, 
716
716
                        bool ordered_output);
717
717
};
718
718
 
719
 
QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, Table *table,
 
719
QUICK_RANGE_SELECT *get_quick_select_for_ref(Session *thd, Table *table,
720
720
                                             struct st_table_ref *ref,
721
721
                                             ha_rows records);
722
722
uint32_t get_index_for_order(Table *table, order_st *order, ha_rows limit);