~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cursor.h

  • Committer: Brian Aker
  • Date: 2009-11-17 17:45:47 UTC
  • mto: This revision was merged to the branch mainline in revision 1222.
  • Revision ID: brian@gaz-20091117174547-omuu6kybq2aac5fg
Small cleanup from something Jay noticed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
    being scanned.
192
192
  */
193
193
  bool in_range_check_pushed_down;
194
 
  bool is_ordered;
195
 
  bool isOrdered(void)
196
 
  {
197
 
    return is_ordered;
198
 
  }
199
 
 
200
194
 
201
195
  /** Current range (the one we're now returning rows from) */
202
196
  KEY_MULTI_RANGE mrr_cur_range;
242
236
    :table_share(&share_arg), table(0),
243
237
    estimation_rows_to_insert(0), engine(&engine_arg),
244
238
    ref(0), in_range_check_pushed_down(false),
245
 
    is_ordered(false),
246
239
    key_used_on_scan(MAX_KEY), active_index(MAX_KEY),
247
240
    ref_length(sizeof(my_off_t)),
248
241
    inited(NONE),
617
610
   return memcmp(ref1, ref2, ref_length);
618
611
 }
619
612
 
620
 
  /**
621
 
    Lock table.
622
 
 
623
 
    @param    session                     Thread handle
624
 
    @param    lock_type               HA_LOCK_IN_SHARE_MODE     (F_RDLCK)
625
 
                                      HA_LOCK_IN_EXCLUSIVE_MODE (F_WRLCK)
626
 
    @param    lock_timeout            -1 default timeout
627
 
                                      0  no wait
628
 
                                      >0 wait timeout in milliseconds.
629
 
 
630
 
   @note
631
 
      lock_timeout >0 is not used by MySQL currently. If the storage
632
 
      engine does not support NOWAIT (lock_timeout == 0) it should
633
 
      return an error. But if it does not support WAIT X (lock_timeout
634
 
      >0) it should treat it as lock_timeout == -1 and wait a default
635
 
      (or even hard-coded) timeout.
636
 
 
637
 
    @retval HA_ERR_WRONG_COMMAND      Storage engine does not support
638
 
                                      lock_table()
639
 
    @retval HA_ERR_UNSUPPORTED        Storage engine does not support NOWAIT
640
 
    @retval HA_ERR_LOCK_WAIT_TIMEOUT  Lock request timed out or
641
 
                                      lock conflict with NOWAIT option
642
 
    @retval HA_ERR_LOCK_DEADLOCK      Deadlock detected
643
 
  */
644
 
  virtual int lock_table(Session *, int, int)
 
613
  virtual bool isOrdered(void)
645
614
  {
646
 
    return HA_ERR_WRONG_COMMAND;
 
615
    return false;
647
616
  }
648
617
 
 
618
 
649
619
protected:
650
620
  /* Service methods for use by storage engines. */
651
621
  void ha_statistic_increment(ulong SSV::*offset) const;
769
739
  */
770
740
  virtual int reset_auto_increment(uint64_t)
771
741
  { return HA_ERR_WRONG_COMMAND; }
 
742
 
772
743
  virtual int optimize(Session *, HA_CHECK_OPT *)
773
744
  { return HA_ADMIN_NOT_IMPLEMENTED; }
 
745
 
774
746
  virtual int analyze(Session *, HA_CHECK_OPT *)
775
747
  { return HA_ADMIN_NOT_IMPLEMENTED; }
776
748
 
777
749
  virtual int disable_indexes(uint32_t)
778
750
  { return HA_ERR_WRONG_COMMAND; }
 
751
 
779
752
  virtual int enable_indexes(uint32_t)
780
753
  { return HA_ERR_WRONG_COMMAND; }
 
754
 
781
755
  virtual int discard_or_import_tablespace(bool)
782
756
  { return (my_errno=HA_ERR_WRONG_COMMAND); }
 
757
 
 
758
  /* 
 
759
    @todo this is just for the HEAP engine, it should
 
760
    be removed at some point in the future (and
 
761
    no new engine should ever use it). Right
 
762
    now HEAP does rely on it, so we cannot remove it.
 
763
  */
783
764
  virtual void drop_table(const char *name);
784
765
};
785
766