123
127
typedef struct st_mi_isaminfo /* Struct from h_info */
125
drizzled::ha_rows records; /* Records in database */
126
drizzled::ha_rows deleted; /* Deleted records in database */
127
drizzled::internal::my_off_t recpos; /* Pos for last used record */
128
drizzled::internal::my_off_t newrecpos; /* Pos if we write new record */
129
drizzled::internal::my_off_t dupp_key_pos; /* Position to record with dupp key */
130
drizzled::internal::my_off_t data_file_length, /* Length of data file */
129
ha_rows records; /* Records in database */
130
ha_rows deleted; /* Deleted records in database */
131
my_off_t recpos; /* Pos for last used record */
132
my_off_t newrecpos; /* Pos if we write new record */
133
my_off_t dupp_key_pos; /* Position to record with dupp key */
134
my_off_t data_file_length, /* Length of data file */
131
135
max_data_file_length,
132
136
index_file_length,
133
137
max_index_file_length,
242
243
#ifndef NOT_PACKED_DATABASES
243
244
void (*unpack)(struct st_columndef *rec,struct st_mi_bit_buff *buff,
244
245
unsigned char *start,unsigned char *end);
245
enum drizzled::en_fieldtype base_type;
246
enum en_fieldtype base_type;
246
247
uint32_t space_length_bits,pack_type;
247
248
MI_DECODE_TREE *huff_tree;
254
253
extern char * myisam_log_filename; /* Name of logfile */
255
254
extern uint32_t myisam_block_size;
263
262
extern int mi_delete(struct st_myisam_info *file,const unsigned char *buff);
264
263
extern struct st_myisam_info *mi_open(const char *name,int mode,
265
264
uint32_t wait_if_locked);
266
extern int mi_panic(enum drizzled::ha_panic_function function);
265
extern int mi_panic(enum ha_panic_function function);
267
266
extern int mi_rfirst(struct st_myisam_info *file,unsigned char *buf,int inx);
268
267
extern int mi_rkey(MI_INFO *info, unsigned char *buf, int inx, const unsigned char *key,
269
drizzled::key_part_map keypart_map, enum drizzled::ha_rkey_function search_flag);
268
key_part_map keypart_map, enum ha_rkey_function search_flag);
270
269
extern int mi_rlast(struct st_myisam_info *file,unsigned char *buf,int inx);
271
270
extern int mi_rnext(struct st_myisam_info *file,unsigned char *buf,int inx);
272
271
extern int mi_rnext_same(struct st_myisam_info *info, unsigned char *buf);
273
272
extern int mi_rprev(struct st_myisam_info *file,unsigned char *buf,int inx);
274
extern int mi_rrnd(struct st_myisam_info *file,unsigned char *buf, drizzled::internal::my_off_t pos);
273
extern int mi_rrnd(struct st_myisam_info *file,unsigned char *buf, my_off_t pos);
275
274
extern int mi_scan_init(struct st_myisam_info *file);
276
275
extern int mi_scan(struct st_myisam_info *file,unsigned char *buf);
277
276
extern int mi_rsame(struct st_myisam_info *file,unsigned char *record,int inx);
278
277
extern int mi_update(struct st_myisam_info *file,const unsigned char *old,
279
278
unsigned char *new_record);
280
279
extern int mi_write(struct st_myisam_info *file,unsigned char *buff);
281
extern drizzled::internal::my_off_t mi_position(struct st_myisam_info *file);
280
extern my_off_t mi_position(struct st_myisam_info *file);
282
281
extern int mi_status(struct st_myisam_info *info, MI_ISAMINFO *x, uint32_t flag);
283
282
extern int mi_lock_database(struct st_myisam_info *file,int lock_type);
284
283
extern int mi_create(const char *name,uint32_t keys,MI_KEYDEF *keydef,
285
uint32_t columns, drizzled::MI_COLUMNDEF *columndef,
284
uint32_t columns, MI_COLUMNDEF *columndef,
286
285
uint32_t uniques, MI_UNIQUEDEF *uniquedef,
287
286
MI_CREATE_INFO *create_info, uint32_t flags);
288
287
extern int mi_delete_table(const char *name);
289
288
extern int mi_rename(const char *from, const char *to);
290
289
extern int mi_extra(struct st_myisam_info *file,
291
enum drizzled::ha_extra_function function,
290
enum ha_extra_function function,
292
291
void *extra_arg);
293
292
extern int mi_reset(struct st_myisam_info *file);
294
extern drizzled::ha_rows mi_records_in_range(MI_INFO *info, int inx,
295
drizzled::key_range *min_key, drizzled::key_range *max_key);
293
extern ha_rows mi_records_in_range(MI_INFO *info, int inx,
294
key_range *min_key, key_range *max_key);
296
295
extern int mi_log(int activate_log);
297
296
extern int mi_delete_all_rows(struct st_myisam_info *info);
298
297
extern ulong _mi_calc_blob_length(uint32_t length , const unsigned char *pos);
385
384
uint64_t max_data_file_length;
386
385
uint64_t keys_in_use;
387
386
uint64_t max_record_length;
388
drizzled::internal::my_off_t search_after_block;
389
drizzled::internal::my_off_t new_file_pos,key_file_blocks;
390
drizzled::internal::my_off_t keydata,totaldata,key_blocks,start_check_pos;
391
drizzled::ha_rows total_records,total_deleted;
392
drizzled::internal::ha_checksum record_checksum,glob_crc;
387
my_off_t search_after_block;
388
my_off_t new_file_pos,key_file_blocks;
389
my_off_t keydata,totaldata,key_blocks,start_check_pos;
390
ha_rows total_records,total_deleted;
391
ha_checksum record_checksum,glob_crc;
393
392
uint64_t use_buffers;
394
393
size_t read_buffer_length, write_buffer_length,
395
394
sort_buffer_length, sort_key_blocks;
460
459
void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
461
460
uint64_t *unique, uint64_t *notnull,
462
461
uint64_t records);
463
int filecopy(MI_CHECK *param, int to,int from,drizzled::internal::my_off_t start,
464
drizzled::internal::my_off_t length, const char *type);
465
int movepoint(MI_INFO *info,unsigned char *record,drizzled::internal::my_off_t oldpos,
466
drizzled::internal::my_off_t newpos, uint32_t prot_key);
462
int filecopy(MI_CHECK *param, int to,int from,my_off_t start,
463
my_off_t length, const char *type);
464
int movepoint(MI_INFO *info,unsigned char *record,my_off_t oldpos,
465
my_off_t newpos, uint32_t prot_key);
467
466
int write_data_suffix(SORT_INFO *sort_info, bool fix_datafile);
468
467
int test_if_almost_full(MI_INFO *info);
469
468
int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename);
470
bool mi_test_if_sort_rep(MI_INFO *info, drizzled::ha_rows rows, uint64_t key_map,
469
bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows, uint64_t key_map,
473
int mi_init_bulk_insert(MI_INFO *info, uint32_t cache_size, drizzled::ha_rows rows);
472
int mi_init_bulk_insert(MI_INFO *info, uint32_t cache_size, ha_rows rows);
474
473
void mi_flush_bulk_insert(MI_INFO *info, uint32_t inx);
475
474
void mi_end_bulk_insert(MI_INFO *info);
476
475
int mi_preload(MI_INFO *info, uint64_t key_map, bool ignore_leaves);
478
480
#endif /* PLUGIN_MYISAM_MYISAM_H */