61
62
HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR);
63
64
const key_map *keys_to_use_for_scanning() { return &btree_keys; }
64
uint32_t max_supported_keys() const { return MAX_KEY; }
65
uint32_t max_supported_key_part_length() const { return MAX_KEY_LENGTH; }
65
uint max_supported_keys() const { return MAX_KEY; }
66
uint max_supported_key_part_length() const { return MAX_KEY_LENGTH; }
67
68
{ return (double) (stats.records+stats.deleted) / 20.0+10; }
68
double read_time(uint32_t index __attribute__((unused)),
69
uint32_t ranges __attribute__((unused)),
69
double read_time(uint index __attribute__((unused)),
70
uint ranges __attribute__((unused)),
71
72
{ return (double) rows / 20.0+1; }
73
int open(const char *name, int mode, uint32_t test_if_locked);
74
int open(const char *name, int mode, uint test_if_locked);
75
76
void set_keys_for_scanning(void);
76
int write_row(unsigned char * buf);
77
int update_row(const unsigned char * old_data, unsigned char * new_data);
78
int delete_row(const unsigned char * buf);
77
int write_row(uchar * buf);
78
int update_row(const uchar * old_data, uchar * new_data);
79
int delete_row(const uchar * buf);
79
80
virtual void get_auto_increment(uint64_t offset, uint64_t increment,
80
81
uint64_t nb_desired_values,
81
82
uint64_t *first_value,
82
83
uint64_t *nb_reserved_values);
83
int index_read_map(unsigned char * buf, const unsigned char * key, key_part_map keypart_map,
84
int index_read_map(uchar * buf, const uchar * key, key_part_map keypart_map,
84
85
enum ha_rkey_function find_flag);
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, uint32_t index, const unsigned char * key,
86
int index_read_last_map(uchar *buf, const uchar *key, key_part_map keypart_map);
87
int index_read_idx_map(uchar * buf, uint index, const uchar * key,
87
88
key_part_map keypart_map,
88
89
enum ha_rkey_function find_flag);
89
int index_next(unsigned char * buf);
90
int index_prev(unsigned char * buf);
91
int index_first(unsigned char * buf);
92
int index_last(unsigned char * buf);
90
int index_next(uchar * buf);
91
int index_prev(uchar * buf);
92
int index_first(uchar * buf);
93
int index_last(uchar * buf);
93
94
int rnd_init(bool scan);
94
int rnd_next(unsigned char *buf);
95
int rnd_pos(unsigned char * buf, unsigned char *pos);
96
void position(const unsigned char *record);
95
int rnd_next(uchar *buf);
96
int rnd_pos(uchar * buf, uchar *pos);
97
void position(const uchar *record);
98
99
int extra(enum ha_extra_function operation);
100
101
int external_lock(THD *thd, int lock_type);
101
102
int delete_all_rows(void);
102
int disable_indexes(uint32_t mode);
103
int enable_indexes(uint32_t mode);
103
int disable_indexes(uint mode);
104
int enable_indexes(uint mode);
104
105
int indexes_are_disabled(void);
105
ha_rows records_in_range(uint32_t inx, key_range *min_key, key_range *max_key);
106
ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
106
107
int delete_table(const char *from);
107
108
void drop_table(const char *name);
108
109
int rename_table(const char * from, const char * to);
109
int create(const char *name, Table *form, HA_CREATE_INFO *create_info);
110
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);
110
111
void update_create_info(HA_CREATE_INFO *create_info);
112
113
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
113
114
enum thr_lock_type lock_type);
114
int cmp_ref(const unsigned char *ref1, const unsigned char *ref2)
115
int cmp_ref(const uchar *ref1, const uchar *ref2)
116
117
return memcmp(ref1, ref2, sizeof(HEAP_PTR));
118
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint32_t table_changes);
119
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes);
120
121
void update_key_stats();