~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to include/myisam.h

Merge from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
           delete_length;
138
138
  ulong reclength;                      /* Recordlength */
139
139
  ulong mean_reclength;                 /* Mean recordlength (if packed) */
140
 
  ulonglong auto_increment;
141
 
  ulonglong key_map;                    /* Which keys are used */
 
140
  uint64_t auto_increment;
 
141
  uint64_t key_map;                     /* Which keys are used */
142
142
  char  *data_file_name, *index_file_name;
143
143
  uint  keys;                           /* Number of keys in use */
144
144
  uint  options;                        /* HA_OPTION_... used */
159
159
  const char *index_file_name, *data_file_name; /* If using symlinks */
160
160
  ha_rows max_rows;
161
161
  ha_rows reloc_rows;
162
 
  ulonglong auto_increment;
163
 
  ulonglong data_file_length;
164
 
  ulonglong key_file_length;
 
162
  uint64_t auto_increment;
 
163
  uint64_t data_file_length;
 
164
  uint64_t key_file_length;
165
165
  uint old_options;
166
166
  uint8 language;
167
167
  my_bool with_auto_increment;
186
186
  uint16 maxlength;                     /* max length of (packed) key (auto) */
187
187
  uint16 block_size_index;              /* block_size (auto) */
188
188
  uint32 version;                       /* For concurrent read/write */
189
 
  uint32 ftparser_nr;                   /* distinct ftparser number */
190
189
 
191
190
  HA_KEYSEG *seg,*end;
192
 
  struct st_mysql_ftparser *parser;     /* Fulltext [pre]parser */
 
191
 
193
192
  int (*bin_search)(struct st_myisam_info *info,struct st_mi_keydef *keyinfo,
194
193
                    uchar *page,uchar *key,
195
194
                    uint key_len,uint comp_flag,uchar * *ret_pos,
253
252
extern char * myisam_log_filename;              /* Name of logfile */
254
253
extern ulong myisam_block_size;
255
254
extern ulong myisam_concurrent_insert;
256
 
extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user;
 
255
extern bool myisam_flush,myisam_delay_key_write,myisam_single_user;
257
256
extern my_off_t myisam_max_temp_length;
258
257
extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;
259
258
 
299
298
extern int mi_is_changed(struct st_myisam_info *info);
300
299
extern int mi_delete_all_rows(struct st_myisam_info *info);
301
300
extern ulong _mi_calc_blob_length(uint length , const uchar *pos);
302
 
extern uint mi_get_pointer_length(ulonglong file_length, uint def);
 
301
extern uint mi_get_pointer_length(uint64_t file_length, uint def);
303
302
 
304
303
/* this is used to pass to mysql_myisamchk_table */
305
304
 
392
391
 
393
392
typedef struct st_mi_check_param
394
393
{
395
 
  ulonglong auto_increment_value;
396
 
  ulonglong max_data_file_length;
397
 
  ulonglong keys_in_use;
398
 
  ulonglong max_record_length;
 
394
  uint64_t auto_increment_value;
 
395
  uint64_t max_data_file_length;
 
396
  uint64_t keys_in_use;
 
397
  uint64_t max_record_length;
399
398
  my_off_t search_after_block;
400
399
  my_off_t new_file_pos,key_file_blocks;
401
400
  my_off_t keydata,totaldata,key_blocks,start_check_pos;
419
418
    The next two are used to collect statistics, see update_key_parts for
420
419
    description.
421
420
  */
422
 
  ulonglong unique_count[MI_MAX_KEY_SEG+1];
423
 
  ulonglong notnull_count[MI_MAX_KEY_SEG+1];
 
421
  uint64_t unique_count[MI_MAX_KEY_SEG+1];
 
422
  uint64_t notnull_count[MI_MAX_KEY_SEG+1];
424
423
  
425
424
  ha_checksum key_crc[HA_MAX_POSSIBLE_KEY];
426
425
  ulong rec_per_key_part[MI_MAX_KEY_SEG*HA_MAX_POSSIBLE_KEY];
430
429
  enum_mi_stats_method stats_method;
431
430
} MI_CHECK;
432
431
 
433
 
typedef struct st_sort_ft_buf
434
 
{
435
 
  uchar *buf, *end;
436
 
  int   count;
437
 
  uchar lastkey[MI_MAX_KEY_BUFF];
438
 
} SORT_FT_BUF;
439
 
 
440
432
typedef struct st_sort_info
441
433
{
442
434
  my_off_t filelength,dupp,buff_length;
448
440
  MI_CHECK *param;
449
441
  uchar *buff;
450
442
  SORT_KEY_BLOCKS *key_block,*key_block_end;
451
 
  SORT_FT_BUF *ft_buf;
452
443
  /* sync things */
453
444
  uint got_error, threads_running;
454
445
  pthread_mutex_t mutex;
472
463
int change_to_newfile(const char * filename, const char * old_ext,
473
464
                      const char * new_ext, uint raid_chunks,
474
465
                      myf myflags);
475
 
int lock_file(MI_CHECK *param, File file, my_off_t start, int lock_type,
476
 
              const char *filetype, const char *filename);
477
466
void lock_memory(MI_CHECK *param);
478
467
void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
479
468
                               my_bool repair);
480
469
int update_state_info(MI_CHECK *param, MI_INFO *info,uint update);
481
470
void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
482
 
                      ulonglong *unique, ulonglong *notnull, 
483
 
                      ulonglong records);
 
471
                      uint64_t *unique, uint64_t *notnull, 
 
472
                      uint64_t records);
484
473
int filecopy(MI_CHECK *param, File to,File from,my_off_t start,
485
474
             my_off_t length, const char *type);
486
475
int movepoint(MI_INFO *info,uchar *record,my_off_t oldpos,
488
477
int write_data_suffix(SORT_INFO *sort_info, my_bool fix_datafile);
489
478
int test_if_almost_full(MI_INFO *info);
490
479
int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename);
491
 
my_bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows, ulonglong key_map,
 
480
my_bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows, uint64_t key_map,
492
481
                            my_bool force);
493
482
 
494
483
int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows);
495
484
void mi_flush_bulk_insert(MI_INFO *info, uint inx);
496
485
void mi_end_bulk_insert(MI_INFO *info);
497
 
int mi_assign_to_key_cache(MI_INFO *info, ulonglong key_map, 
 
486
int mi_assign_to_key_cache(MI_INFO *info, uint64_t key_map, 
498
487
                           KEY_CACHE *key_cache);
499
488
void mi_change_key_cache(KEY_CACHE *old_key_cache,
500
489
                         KEY_CACHE *new_key_cache);
501
 
int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves);
 
490
int mi_preload(MI_INFO *info, uint64_t key_map, my_bool ignore_leaves);
502
491
 
503
492
#ifdef  __cplusplus
504
493
}