~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/ha_heap.h

  • Committer: Monty Taylor
  • Date: 2008-11-18 22:12:56 UTC
  • mto: (589.1.3 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081118221256-ap2kmj073pdw7uap
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
/* class for the the heap handler */
19
19
 
 
20
#ifndef STORAGE_HEAP_HA_HEAP_H
 
21
#define STORAGE_HEAP_HA_HEAP_H
 
22
 
 
23
#include <drizzled/handler.h>
 
24
#include <mysys/thr_lock.h>
20
25
#include <heap.h>
21
26
 
22
27
class ha_heap: public handler
36
41
  {
37
42
    return "MEMORY";
38
43
  }
39
 
  const char *index_type(uint32_t inx)
40
 
  {
41
 
    return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
42
 
            "BTREE" : "HASH");
43
 
  }
 
44
  const char *index_type(uint32_t inx);
44
45
  enum row_type get_row_type() const;
45
46
  const char **bas_ext() const;
46
47
  uint64_t table_flags() const
50
51
            HA_REC_NOT_IN_SEQ | HA_NO_TRANSACTIONS |
51
52
            HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT);
52
53
  }
53
 
  uint32_t index_flags(uint32_t inx, uint32_t part __attribute__((unused)),
54
 
                       bool all_parts __attribute__((unused))) const
55
 
  {
56
 
    return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
57
 
            HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER | HA_READ_RANGE :
58
 
            HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR);
59
 
  }
 
54
  uint32_t index_flags(uint32_t inx, uint32_t part, bool all_parts) const;
60
55
  const key_map *keys_to_use_for_scanning() { return &btree_keys; }
61
56
  uint32_t max_supported_keys()          const { return MAX_KEY; }
62
57
  uint32_t max_supported_key_part_length() const { return MAX_KEY_LENGTH; }
77
72
                                  uint64_t nb_desired_values,
78
73
                                  uint64_t *first_value,
79
74
                                  uint64_t *nb_reserved_values);
80
 
  int index_read_map(unsigned char * buf, const unsigned char * key, key_part_map keypart_map,
 
75
  int index_read_map(unsigned char * buf, const unsigned char * key,
 
76
                     key_part_map keypart_map,
81
77
                     enum ha_rkey_function find_flag);
82
 
  int index_read_last_map(unsigned char *buf, const unsigned char *key, key_part_map keypart_map);
83
 
  int index_read_idx_map(unsigned char * buf, uint32_t index, const unsigned char * key,
 
78
  int index_read_last_map(unsigned char *buf, const unsigned char *key,
 
79
                          key_part_map keypart_map);
 
80
  int index_read_idx_map(unsigned char * buf, uint32_t index,
 
81
                         const unsigned char * key,
84
82
                         key_part_map keypart_map,
85
83
                         enum ha_rkey_function find_flag);
86
84
  int index_next(unsigned char * buf);
107
105
  void update_create_info(HA_CREATE_INFO *create_info);
108
106
 
109
107
  THR_LOCK_DATA **store_lock(Session *session, THR_LOCK_DATA **to,
110
 
                             enum thr_lock_type lock_type);
 
108
                             enum thr_lock_type lock_type);
111
109
  int cmp_ref(const unsigned char *ref1, const unsigned char *ref2)
112
110
  {
113
111
    return memcmp(ref1, ref2, sizeof(HEAP_PTR));
116
114
private:
117
115
  void update_key_stats();
118
116
};
 
117
 
 
118
#endif /* STORAGE_HEAP_HA_HEAP_H */