68
68
uint num_write_row; /* number of write_row() calls */
70
uint store_key_val_for_row(uint keynr, char* buff, uint buff_len,
70
uint32_t store_key_val_for_row(uint32_t keynr, char* buff, uint32_t buff_len,
71
71
const unsigned char* record);
72
72
int update_thd(THD* thd);
73
int change_active_index(uint keynr);
74
int general_fetch(unsigned char* buf, uint direction, uint match_mode);
73
int change_active_index(uint32_t keynr);
74
int general_fetch(unsigned char* buf, uint32_t direction, uint32_t match_mode);
75
75
int innobase_read_and_init_auto_inc(int64_t* ret);
76
76
ulong innobase_autoinc_lock();
77
77
ulong innobase_set_max_autoinc(uint64_t auto_inc);
78
78
ulong innobase_reset_autoinc(uint64_t auto_inc);
79
79
ulong innobase_get_auto_increment(uint64_t* value);
80
dict_index_t* innobase_get_index(uint keynr);
80
dict_index_t* innobase_get_index(uint32_t keynr);
82
82
/* Init values for the class: */
90
90
enum row_type get_row_type() const;
92
92
const char* table_type() const { return("InnoDB");}
93
const char *index_type(uint key_number __attribute__((unused)))
93
const char *index_type(uint32_t key_number __attribute__((unused)))
94
94
{ return "BTREE"; }
95
95
const char** bas_ext() const;
96
96
Table_flags table_flags() const;
97
uint32_t index_flags(uint idx __attribute__((unused)),
98
uint part __attribute__((unused)),
97
uint32_t index_flags(uint32_t idx __attribute__((unused)),
98
uint32_t part __attribute__((unused)),
99
99
bool all_parts __attribute__((unused))) const
101
101
return (HA_READ_NEXT |
105
105
HA_KEYREAD_ONLY |
106
106
((idx == primary_key)? 0 : HA_DO_INDEX_COND_PUSHDOWN));
108
uint max_supported_keys() const { return MAX_KEY; }
108
uint32_t max_supported_keys() const { return MAX_KEY; }
109
109
/* An InnoDB page must store >= 2 keys;
110
110
a secondary key record must also contain the
111
111
primary key value:
113
113
less than 1 / 4 of page size which is 16 kB;
114
114
but currently MySQL does not work with keys
115
115
whose size is > MAX_KEY_LENGTH */
116
uint max_supported_key_length() const { return 3500; }
117
uint max_supported_key_part_length() const;
116
uint32_t max_supported_key_length() const { return 3500; }
117
uint32_t max_supported_key_part_length() const;
118
118
const key_map *keys_to_use_for_scanning() { return &key_map_full; }
120
int open(const char *name, int mode, uint test_if_locked);
120
int open(const char *name, int mode, uint32_t test_if_locked);
122
122
double scan_time();
123
double read_time(uint index, uint ranges, ha_rows rows);
123
double read_time(uint32_t index, uint32_t ranges, ha_rows rows);
125
125
int write_row(unsigned char * buf);
126
126
int update_row(const unsigned char * old_data, unsigned char * new_data);
129
129
void try_semi_consistent_read(bool yes);
130
130
void unlock_row();
132
int index_init(uint index, bool sorted);
132
int index_init(uint32_t index, bool sorted);
134
134
int index_read(unsigned char * buf, const unsigned char * key,
135
uint key_len, enum ha_rkey_function find_flag);
136
int index_read_idx(unsigned char * buf, uint index, const unsigned char * key,
137
uint key_len, enum ha_rkey_function find_flag);
138
int index_read_last(unsigned char * buf, const unsigned char * key, uint key_len);
135
uint32_t key_len, enum ha_rkey_function find_flag);
136
int index_read_idx(unsigned char * buf, uint32_t index, const unsigned char * key,
137
uint32_t key_len, enum ha_rkey_function find_flag);
138
int index_read_last(unsigned char * buf, const unsigned char * key, uint32_t key_len);
139
139
int index_next(unsigned char * buf);
140
int index_next_same(unsigned char * buf, const unsigned char *key, uint keylen);
140
int index_next_same(unsigned char * buf, const unsigned char *key, uint32_t keylen);
141
141
int index_prev(unsigned char * buf);
142
142
int index_first(unsigned char * buf);
143
143
int index_last(unsigned char * buf);
174
174
int transactional_table_lock(THD *thd, int lock_type);
175
175
int start_stmt(THD *thd, thr_lock_type lock_type);
176
176
void position(unsigned char *record);
177
ha_rows records_in_range(uint inx, key_range *min_key, key_range
177
ha_rows records_in_range(uint32_t inx, key_range *min_key, key_range
179
179
ha_rows estimate_rows_upper_bound();
189
189
char* get_foreign_key_create_info();
190
190
int get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
191
191
bool can_switch_engines();
192
uint referenced_by_foreign_key();
192
uint32_t referenced_by_foreign_key();
193
193
void free_foreign_key_create_info(char* str);
194
194
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
195
195
enum thr_lock_type lock_type);
207
207
ask handler about permission to cache table during query registration
209
209
bool register_query_cache_table(THD *thd, char *table_key,
211
211
qc_engine_callback *call_back,
212
212
uint64_t *engine_data);
213
213
static char *get_mysql_bin_log_name();
215
215
bool primary_key_is_clustered() { return true; }
216
216
int cmp_ref(const unsigned char *ref1, const unsigned char *ref2);
217
217
bool check_if_incompatible_data(HA_CREATE_INFO *info,
218
uint32_t table_changes);
221
221
* Multi Range Read interface
223
223
int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param,
224
uint n_ranges, uint mode, HANDLER_BUFFER *buf);
224
uint32_t n_ranges, uint32_t mode, HANDLER_BUFFER *buf);
225
225
int multi_range_read_next(char **range_info);
226
ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
226
ha_rows multi_range_read_info_const(uint32_t keyno, RANGE_SEQ_IF *seq,
227
227
void *seq_init_param,
228
uint n_ranges, uint *bufsz,
229
uint *flags, COST_VECT *cost);
230
int multi_range_read_info(uint keyno, uint n_ranges, uint keys,
231
uint *bufsz, uint *flags, COST_VECT *cost);
228
uint32_t n_ranges, uint32_t *bufsz,
229
uint32_t *flags, COST_VECT *cost);
230
int multi_range_read_info(uint32_t keyno, uint32_t n_ranges, uint32_t keys,
231
uint32_t *bufsz, uint32_t *flags, COST_VECT *cost);
232
232
DsMrr_impl ds_mrr;
234
234
int read_range_first(const key_range *start_key, const key_range *end_key,
235
235
bool eq_range_arg, bool sorted);
236
236
int read_range_next();
237
Item *idx_cond_push(uint keyno, Item* idx_cond);
237
Item *idx_cond_push(uint32_t keyno, Item* idx_cond);
240
240
/* Some accessor functions which the InnoDB plugin needs, but which