~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/ha_heap.h

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
  HP_SHARE *internal_share;
29
29
  key_map btree_keys;
30
30
  /* number of records changed since last statistics update */
31
 
  uint    records_changed;
32
 
  uint    key_stat_version;
 
31
  uint32_t    records_changed;
 
32
  uint32_t    key_stat_version;
33
33
  bool internal_table;
34
34
public:
35
35
  ha_heap(handlerton *hton, TABLE_SHARE *table);
39
39
  {
40
40
    return "MEMORY";
41
41
  }
42
 
  const char *index_type(uint inx)
 
42
  const char *index_type(uint32_t inx)
43
43
  {
44
44
    return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
45
45
            "BTREE" : "HASH");
53
53
            HA_REC_NOT_IN_SEQ | HA_NO_TRANSACTIONS |
54
54
            HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT);
55
55
  }
56
 
  uint32_t index_flags(uint inx, uint part __attribute__((unused)),
 
56
  uint32_t index_flags(uint32_t inx, uint32_t part __attribute__((unused)),
57
57
                       bool all_parts __attribute__((unused))) const
58
58
  {
59
59
    return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
61
61
            HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR);
62
62
  }
63
63
  const key_map *keys_to_use_for_scanning() { return &btree_keys; }
64
 
  uint max_supported_keys()          const { return MAX_KEY; }
65
 
  uint max_supported_key_part_length() const { return MAX_KEY_LENGTH; }
 
64
  uint32_t max_supported_keys()          const { return MAX_KEY; }
 
65
  uint32_t max_supported_key_part_length() const { return MAX_KEY_LENGTH; }
66
66
  double scan_time()
67
67
  { return (double) (stats.records+stats.deleted) / 20.0+10; }
68
 
  double read_time(uint index __attribute__((unused)),
69
 
                   uint ranges __attribute__((unused)),
 
68
  double read_time(uint32_t index __attribute__((unused)),
 
69
                   uint32_t ranges __attribute__((unused)),
70
70
                   ha_rows rows)
71
71
  { return (double) rows /  20.0+1; }
72
72
 
73
 
  int open(const char *name, int mode, uint test_if_locked);
 
73
  int open(const char *name, int mode, uint32_t test_if_locked);
74
74
  int close(void);
75
75
  void set_keys_for_scanning(void);
76
76
  int write_row(unsigned char * buf);
83
83
  int index_read_map(unsigned char * buf, const unsigned char * key, key_part_map keypart_map,
84
84
                     enum ha_rkey_function find_flag);
85
85
  int index_read_last_map(unsigned char *buf, const unsigned char *key, key_part_map keypart_map);
86
 
  int index_read_idx_map(unsigned char * buf, uint index, const unsigned char * key,
 
86
  int index_read_idx_map(unsigned char * buf, uint32_t index, const unsigned char * key,
87
87
                         key_part_map keypart_map,
88
88
                         enum ha_rkey_function find_flag);
89
89
  int index_next(unsigned char * buf);
99
99
  int reset();
100
100
  int external_lock(THD *thd, int lock_type);
101
101
  int delete_all_rows(void);
102
 
  int disable_indexes(uint mode);
103
 
  int enable_indexes(uint mode);
 
102
  int disable_indexes(uint32_t mode);
 
103
  int enable_indexes(uint32_t mode);
104
104
  int indexes_are_disabled(void);
105
 
  ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
 
105
  ha_rows records_in_range(uint32_t inx, key_range *min_key, key_range *max_key);
106
106
  int delete_table(const char *from);
107
107
  void drop_table(const char *name);
108
108
  int rename_table(const char * from, const char * to);
115
115
  {
116
116
    return memcmp(ref1, ref2, sizeof(HEAP_PTR));
117
117
  }
118
 
  bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes);
 
118
  bool check_if_incompatible_data(HA_CREATE_INFO *info, uint32_t table_changes);
119
119
private:
120
120
  void update_key_stats();
121
121
};