~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cursor.h

  • Committer: Brian Aker
  • Date: 2009-11-18 06:11:12 UTC
  • mfrom: (1220.1.10 staging)
  • Revision ID: brian@gaz-20091118061112-tyf4qrfr5v7i946b
Monty + Brian Merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
typedef std::bitset<HA_MAX_ALTER_FLAGS> HA_ALTER_FLAGS;
51
51
 
52
 
extern drizzled::atomic<uint32_t> refresh_version;  /* Increments on each reload */
 
52
extern uint64_t refresh_version;  /* Increments on each reload */
53
53
 
54
54
 
55
55
typedef bool (*qc_engine_callback)(Session *session, char *table_key,
163
163
 
164
164
class Cursor :public Sql_alloc
165
165
{
166
 
public:
167
 
  typedef uint64_t Table_flags;
168
 
 
169
166
protected:
170
167
  TableShare *table_share;   /* The table definition */
171
168
  Table *table;               /* The current open table */
172
 
  Table_flags cached_table_flags;       /* Set on init() and open() */
173
169
 
174
170
  ha_rows estimation_rows_to_insert;
175
171
public:
195
191
    being scanned.
196
192
  */
197
193
  bool in_range_check_pushed_down;
 
194
  bool is_ordered;
 
195
  bool isOrdered(void)
 
196
  {
 
197
    return is_ordered;
 
198
  }
 
199
 
198
200
 
199
201
  /** Current range (the one we're now returning rows from) */
200
202
  KEY_MULTI_RANGE mrr_cur_range;
240
242
    :table_share(&share_arg), table(0),
241
243
    estimation_rows_to_insert(0), engine(&engine_arg),
242
244
    ref(0), in_range_check_pushed_down(false),
 
245
    is_ordered(false),
243
246
    key_used_on_scan(MAX_KEY), active_index(MAX_KEY),
244
247
    ref_length(sizeof(my_off_t)),
245
248
    inited(NONE),
248
251
    {}
249
252
  virtual ~Cursor(void);
250
253
  virtual Cursor *clone(MEM_ROOT *mem_root);
251
 
  /** This is called after create to allow us to set up cached variables */
252
 
  void init()
253
 
  {
254
 
    cached_table_flags= table_flags();
255
 
  }
256
254
 
257
255
  /* ha_ methods: pubilc wrappers for private virtual API */
258
256
 
265
263
 
266
264
  /* this is necessary in many places, e.g. in HANDLER command */
267
265
  int ha_index_or_rnd_end();
268
 
  Table_flags ha_table_flags() const;
 
266
  drizzled::plugin::StorageEngine::Table_flags ha_table_flags() const;
269
267
 
270
268
  /**
271
269
    These functions represent the public interface to *users* of the
298
296
 
299
297
  void adjust_next_insert_id_after_explicit_value(uint64_t nr);
300
298
  int update_auto_increment();
301
 
  void print_keydup_error(uint32_t key_nr, const char *msg);
302
 
  virtual void print_error(int error, myf errflag);
303
 
  virtual bool get_error_message(int error, String *buf);
304
 
  uint32_t get_dup_key(int error);
305
299
  virtual void change_table_ptr(Table *table_arg, TableShare *share);
306
300
 
307
301
  /* Estimates calculation */
701
695
    by that statement.
702
696
  */
703
697
  virtual int reset() { return 0; }
704
 
  virtual Table_flags table_flags(void) const= 0;
705
698
 
706
699
  /**
707
700
    Is not invoked for non-transactional temporary tables.