20 #include "myisampack.h"
22 #include <my_pthread.h>
37 my_off_t key_file_length;
38 my_off_t data_file_length;
46 uchar file_version[4];
48 uchar header_length[2];
49 uchar state_info_length[2];
50 uchar base_info_length[2];
53 uchar unique_key_parts[2];
57 uchar max_block_size_index;
65 ulonglong auto_increment;
70 ulong *rec_per_key_part;
73 my_off_t rec_per_key_rows;
75 ulong sec_index_changed;
88 uint state_diff_length;
93 #define MI_STATE_INFO_SIZE (24+14*8+7*4+2*2+8)
94 #define MI_STATE_KEY_SIZE 8
95 #define MI_STATE_KEYBLOCK_SIZE 8
96 #define MI_STATE_KEYSEG_SIZE 4
97 #define MI_STATE_EXTRA_SIZE ((MI_MAX_KEY+MI_MAX_KEY_BLOCK_SIZE)*MI_STATE_KEY_SIZE + MI_MAX_KEY*MI_MAX_KEY_SEG*MI_STATE_KEYSEG_SIZE)
98 #define MI_KEYDEF_SIZE (2+ 5*2)
99 #define MI_UNIQUEDEF_SIZE (2+1+1)
100 #define HA_KEYSEG_SIZE (6+ 2*2 + 4*2)
101 #define MI_COLUMNDEF_SIZE (2*3+1)
102 #define MI_BASE_INFO_SIZE (5*8 + 8*4 + 4 + 4*2 + 16)
103 #define MI_INDEX_BLOCK_MARGIN 16
108 my_off_t max_data_file_length;
109 my_off_t max_key_file_length;
110 my_off_t margin_key_file_length;
111 ha_rows records,reloc;
112 ulong mean_row_length;
114 ulong pack_reclength;
115 ulong min_pack_length;
116 ulong max_pack_length;
117 ulong min_block_length;
126 uint max_key_block_length;
129 uint extra_alloc_bytes;
130 uint extra_alloc_procent;
132 uint key_parts,all_key_parts;
152 #define MAX_NONMAPPED_INSERTS 1000
165 char *unique_file_name;
166 char *data_file_name,
171 uint16 *decode_tables;
174 int (*update_record)(
struct st_myisam_info*, my_off_t,
const uchar*);
176 int (*read_rnd)(
struct st_myisam_info*, uchar*, my_off_t, my_bool);
179 ha_checksum (*calc_checksum)(
struct st_myisam_info*,
const uchar *);
181 const uchar *
record, my_off_t pos);
182 size_t (*file_read)(
MI_INFO *, uchar *, size_t, my_off_t, myf);
183 size_t (*file_write)(
MI_INFO *,
const uchar *, size_t, my_off_t, myf);
184 invalidator_by_filename invalidator;
189 ulong min_pack_length;
190 ulong max_pack_length;
191 ulong state_diff_length;
193 uint unique_name_length;
199 uint w_locks,r_locks,tot_locks;
202 enum data_file_type data_file_type;
204 my_bool is_log_table;
209 temporary,delay_key_write,
215 my_off_t mmaped_length;
216 uint nonmmaped_inserts;
221 typedef uint mi_bit_type;
224 mi_bit_type current_byte;
226 uchar *pos,*end,*blob_pos,*blob_end;
231 typedef ICP_RESULT (*index_cond_func_t)(
void *param);
248 uchar *first_mbr_key;
253 uint32 int_keytree_version;
255 invalidator_by_filename invalidator;
262 my_off_t save_lastpos;
264 my_off_t last_keypage;
265 my_off_t last_search_keypage;
266 my_off_t dupp_key_pos;
267 ha_checksum checksum;
270 ulong packed_length,blob_length;
276 uint last_rkey_length;
277 enum ha_rkey_function last_key_func;
278 uint save_lastkey_length;
279 uint pack_key_length;
280 uint16 last_used_keyseg;
289 uint preload_buff_size;
292 my_bool append_insert_at_end;
294 my_bool page_changed;
298 index_cond_func_t index_cond_func;
299 void *index_cond_func_arg;
301 my_bool owned_by_merge;
304 uchar *rtree_recursion_state;
305 int rtree_recursion_depth;
319 IO_CACHE read_cache, tempfile, tempfile_for_exceptions;
327 ulonglong unique[MI_MAX_KEY_SEG+1];
328 ulonglong notnull[MI_MAX_KEY_SEG+1];
329 ulonglong sortbuff_size;
331 my_off_t pos,max_pos,filepos,start_recpos;
332 uint key, key_length,real_key_length;
333 uint maxbuffers, keys, find_length, sort_keys_length;
334 my_bool fix_datafile, master;
335 my_bool calc_checksum;
341 void *wordlist, *wordptr;
358 #define USE_WHOLE_KEY MI_MAX_KEY_BUFF*2
359 #define F_EXTRA_LCK -1
362 #define MEMMAP_USED 32
363 #define REMEMBER_OLD_POS 64
365 #define WRITEINFO_UPDATE_KEYFILE 1
366 #define WRITEINFO_NO_UNLOCK 2
369 #define USE_PACKED_KEYS 1
370 #define RRND_PRESERVE_LASTINX 2
374 #define STATE_CHANGED 1
375 #define STATE_CRASHED 2
376 #define STATE_CRASHED_ON_REPAIR 4
377 #define STATE_NOT_ANALYZED 8
378 #define STATE_NOT_OPTIMIZED_KEYS 16
379 #define STATE_NOT_SORTED_PAGES 32
383 #define READING_NEXT 1
384 #define READING_HEADER 2
386 #define mi_getint(x) ((uint) mi_uint2korr(x) & 32767)
387 #define mi_putint(x,y,nod) { uint16 boh=(nod ? (uint16) 32768 : 0) + (uint16) (y);\
388 mi_int2store(x,boh); }
389 #define mi_test_if_nod(x) (x[0] & 128 ? info->s->base.key_reflength : 0)
390 #define mi_report_crashed(A, B) _mi_report_crashed((A), (B), __FILE__, __LINE__)
391 #define mi_mark_crashed(x) do{(x)->s->state.changed|= STATE_CRASHED; \
392 DBUG_PRINT("error", ("Marked table crashed")); \
393 mi_report_crashed((x), 0); \
395 #define mi_mark_crashed_on_repair(x) do{(x)->s->state.changed|= \
396 STATE_CRASHED|STATE_CRASHED_ON_REPAIR; \
397 (x)->update|= HA_STATE_CHANGED; \
398 DBUG_PRINT("error", \
399 ("Marked table crashed")); \
401 #define mi_is_crashed(x) ((x)->s->state.changed & STATE_CRASHED)
402 #define mi_is_crashed_on_repair(x) ((x)->s->state.changed & STATE_CRASHED_ON_REPAIR)
403 #define mi_print_error(SHARE, ERRNO) \
404 mi_report_error((ERRNO), (SHARE)->index_file_name)
408 #define store_key_length(key,length) \
409 { if ((length) < 255) \
410 { *(key)=(length); } \
412 { *(key)=255; mi_int2store((key)+1,(length)); } \
415 #define get_key_full_length(length,key) \
416 { if ((uchar) *(key) != 255) \
417 length= ((uint) (uchar) *((key)++))+1; \
419 { length=mi_uint2korr((key)+1)+3; (key)+=3; } \
422 #define get_key_full_length_rdonly(length,key) \
423 { if ((uchar) *(key) != 255) \
424 length= ((uint) (uchar) *((key)))+1; \
426 { length=mi_uint2korr((key)+1)+3; } \
429 #define get_pack_length(length) ((length) >= 255 ? 3 : 1)
431 #define MI_MIN_BLOCK_LENGTH 20
432 #define MI_EXTEND_BLOCK_LENGTH 20
433 #define MI_SPLIT_LENGTH ((MI_EXTEND_BLOCK_LENGTH+4)*2)
434 #define MI_MAX_DYN_BLOCK_HEADER 20
435 #define MI_BLOCK_INFO_HEADER_LENGTH 20
436 #define MI_DYN_DELETE_BLOCK_HEADER 20
437 #define MI_DYN_MAX_BLOCK_LENGTH ((1L << 24)-4L)
438 #define MI_DYN_MAX_ROW_LENGTH (MI_DYN_MAX_BLOCK_LENGTH - MI_SPLIT_LENGTH)
439 #define MI_DYN_ALIGN_SIZE 4
440 #define MI_MAX_DYN_HEADER_BYTE 13
441 #define MI_MAX_BLOCK_LENGTH ((((ulong) 1 << 24)-1) & (~ (ulong) (MI_DYN_ALIGN_SIZE-1)))
442 #define MI_REC_BUFF_OFFSET ALIGN_SIZE(MI_DYN_DELETE_BLOCK_HEADER+sizeof(uint32))
445 #define PACK_TYPE_SELECTED 1
446 #define PACK_TYPE_SPACE_FIELDS 2
447 #define PACK_TYPE_ZERO_FILL 4
448 #define MI_FOUND_WRONG_KEY 32738
450 #define MI_MAX_KEY_BLOCK_SIZE (MI_MAX_KEY_BLOCK_LENGTH/MI_MIN_KEY_BLOCK_LENGTH)
451 #define MI_BLOCK_SIZE(key_length,data_pointer,key_pointer,block_size) (((((key_length)+(data_pointer)+(key_pointer))*4+(key_pointer)+2)/(block_size)+1)*(block_size))
452 #define MI_MAX_KEYPTR_SIZE 5
453 #define MI_MIN_KEYBLOCK_LENGTH 50
455 #define MI_MIN_SIZE_BULK_INSERT_TREE 16384
456 #define MI_MIN_ROWS_TO_USE_BULK_INSERT 100
457 #define MI_MIN_ROWS_TO_DISABLE_INDEXES 100
458 #define MI_MIN_ROWS_TO_USE_WRITE_CACHE 10
462 #define MI_UNIQUE_HASH_TYPE HA_KEYTYPE_ULONG_INT
463 #define mi_unique_store(A,B) mi_int4store((A),(B))
467 #if defined(DONT_USE_RW_LOCKS)
468 #define mysql_rwlock_wrlock(A) {}
469 #define mysql_rwlock_rdlock(A) {}
470 #define mysql_rwlock_unlock(A) {}
475 extern LIST *myisam_open_list;
476 extern uchar myisam_file_magic[], myisam_pack_file_magic[];
477 extern uint myisam_read_vec[], myisam_readnext_vec[];
478 extern uint myisam_quick_table_bits;
479 extern File myisam_log_file;
480 extern ulong myisam_pid;
486 uint ref_length,key_length,
490 part_of_prev_key,prev_length,pack_marker;
491 uchar *key, *prev_key,*next_key_pos;
492 my_bool store_not_null;
497 extern int _mi_read_dynamic_record(
MI_INFO *info,my_off_t filepos,uchar *
buf);
498 extern int _mi_write_dynamic_record(
MI_INFO*,
const uchar*);
499 extern int _mi_update_dynamic_record(
MI_INFO*, my_off_t,
const uchar*);
500 extern int _mi_delete_dynamic_record(
MI_INFO *info);
501 extern int _mi_cmp_dynamic_record(
MI_INFO *info,
const uchar *
record);
502 extern int _mi_read_rnd_dynamic_record(
MI_INFO *, uchar *,my_off_t, my_bool);
503 extern int _mi_write_blob_record(
MI_INFO*,
const uchar*);
504 extern int _mi_update_blob_record(
MI_INFO*, my_off_t,
const uchar*);
505 extern int _mi_read_static_record(
MI_INFO *info, my_off_t filepos,uchar *
buf);
506 extern int _mi_write_static_record(
MI_INFO*,
const uchar*);
507 extern int _mi_update_static_record(
MI_INFO*, my_off_t,
const uchar*);
508 extern int _mi_delete_static_record(
MI_INFO *info);
509 extern int _mi_cmp_static_record(
MI_INFO *info,
const uchar *
record);
510 extern int _mi_read_rnd_static_record(
MI_INFO*, uchar *,my_off_t, my_bool);
511 extern int _mi_ck_write(
MI_INFO *info,uint keynr,uchar *key,uint length);
513 uchar *key, uint key_length,
514 my_off_t *root, uint comp_flag);
515 extern int _mi_enlarge_root(
MI_INFO *info,
MI_KEYDEF *keyinfo,uchar *key, my_off_t *root);
517 uchar *anc_buff,uchar *key_pos,uchar *key_buff,
518 uchar *father_buff, uchar *father_keypos,
519 my_off_t father_page, my_bool insert_last);
521 uchar *buff,uchar *key_buff, my_bool insert_last);
522 extern uchar *_mi_find_half_pos(uint nod_flag,
MI_KEYDEF *keyinfo,uchar *
page,
523 uchar *key,uint *return_key_length,
525 extern int _mi_calc_static_key_length(
MI_KEYDEF *keyinfo,uint nod_flag,
526 uchar *key_pos, uchar *org_key,
529 extern int _mi_calc_var_key_length(
MI_KEYDEF *keyinfo,uint nod_flag,
530 uchar *key_pos, uchar *org_key,
533 extern int _mi_calc_var_pack_key_length(
MI_KEYDEF *keyinfo,uint nod_flag,
534 uchar *key_pos, uchar *org_key,
537 extern int _mi_calc_bin_pack_key_length(
MI_KEYDEF *keyinfo,uint nod_flag,
538 uchar *key_pos,uchar *org_key,
541 void _mi_store_static_key(
MI_KEYDEF *keyinfo, uchar *key_pos,
543 void _mi_store_var_pack_key(
MI_KEYDEF *keyinfo, uchar *key_pos,
545 void _mi_store_bin_pack_key(
MI_KEYDEF *keyinfo, uchar *key_pos,
548 extern int _mi_ck_delete(
MI_INFO *info,uint keynr,uchar *key,uint key_length);
549 extern int _mi_readinfo(
MI_INFO *info,
int lock_flag,
int check_keybuffer);
550 extern int _mi_writeinfo(
MI_INFO *info,uint options);
551 extern int _mi_test_if_changed(
MI_INFO *info);
552 extern int _mi_mark_file_changed(
MI_INFO *info);
553 extern int _mi_decrement_open_count(
MI_INFO *info);
554 extern int _mi_check_index(
MI_INFO *info,
int inx);
555 extern int _mi_search(
MI_INFO *info,
MI_KEYDEF *keyinfo,uchar *key,uint key_len,
556 uint nextflag,my_off_t pos);
558 uchar *
page,uchar *key,uint key_len,uint comp_flag,
559 uchar * *ret_pos,uchar *buff, my_bool *was_last_key);
561 uchar *key,uint key_len,uint comp_flag,
562 uchar **ret_pos,uchar *buff, my_bool *was_last_key);
564 uchar *key,uint key_len,uint comp_flag,
565 uchar **ret_pos,uchar *buff, my_bool *was_last_key);
566 extern my_off_t _mi_kpos(uint nod_flag,uchar *after_key);
567 extern void _mi_kpointer(
MI_INFO *info,uchar *buff,my_off_t pos);
568 extern my_off_t _mi_dpos(
MI_INFO *info, uint nod_flag,uchar *after_key);
569 extern my_off_t _mi_rec_pos(
MYISAM_SHARE *info, uchar *ptr);
570 extern void _mi_dpointer(
MI_INFO *info, uchar *buff,my_off_t pos);
571 extern int ha_key_cmp(
HA_KEYSEG *keyseg, uchar *a,uchar *b,
572 uint key_length,uint nextflag,uint *diff_length);
573 extern uint _mi_get_static_key(
MI_KEYDEF *keyinfo,uint nod_flag,uchar * *
page,
575 extern uint _mi_get_pack_key(
MI_KEYDEF *keyinfo,uint nod_flag,uchar * *
page,
577 extern uint _mi_get_binary_pack_key(
MI_KEYDEF *keyinfo, uint nod_flag,
578 uchar **page_pos, uchar *key);
579 extern uchar *_mi_get_last_key(
MI_INFO *info,
MI_KEYDEF *keyinfo,uchar *keypos,
580 uchar *lastkey,uchar *endpos,
581 uint *return_key_length);
583 uchar *key, uchar *keypos, uint *return_key_length);
584 extern uint _mi_keylength(
MI_KEYDEF *keyinfo,uchar *key);
585 extern uint _mi_keylength_part(
MI_KEYDEF *keyinfo,
register uchar *key,
587 extern uchar *_mi_move_key(
MI_KEYDEF *keyinfo,uchar *
to,uchar *from);
589 uint key_length,uint nextflag,my_off_t pos);
593 int level,uchar *buff,
int return_buffer);
595 int level, uchar *buff);
599 extern uint _mi_make_key(
MI_INFO *info,uint keynr,uchar *key,
600 const uchar *
record,my_off_t filepos);
601 extern uint _mi_pack_key(
register MI_INFO *info, uint keynr, uchar *key,
602 uchar *old, key_part_map keypart_map,
604 extern int _mi_read_key_record(
MI_INFO *info,my_off_t filepos,uchar *
buf);
605 extern int _mi_read_cache(
IO_CACHE *info,uchar *buff,my_off_t pos,
606 uint length,
int re_read_if_possibly);
607 extern ulonglong retrieve_auto_increment(
MI_INFO *info,
const uchar *
record);
609 extern uchar *mi_alloc_rec_buff(
MI_INFO *,ulong, uchar**);
610 #define mi_get_rec_buff_ptr(info,buf) \
611 ((((info)->s->options & HA_OPTION_PACK_RECORD) && (buf)) ? \
612 (buf) - MI_REC_BUFF_OFFSET : (buf))
613 #define mi_get_rec_buff_len(info,buf) \
614 (*((uint32 *)(mi_get_rec_buff_ptr(info,buf))))
616 extern ulong _mi_rec_unpack(
MI_INFO *info,uchar *
to,uchar *from,
618 extern my_bool _mi_rec_check(
MI_INFO *info,
const uchar *
record, uchar *packpos,
619 ulong packed_length, my_bool with_checkum);
620 extern int _mi_write_part_record(
MI_INFO *info,my_off_t filepos,ulong length,
621 my_off_t next_filepos,uchar **
record,
622 ulong *reclength,
int *flag);
623 extern void _mi_print_key(FILE *stream,
HA_KEYSEG *keyseg,
const uchar *key,
625 extern my_bool _mi_read_pack_info(
MI_INFO *info,pbool fix_keys);
626 extern int _mi_read_pack_record(
MI_INFO *info,my_off_t filepos,uchar *
buf);
627 extern int _mi_read_rnd_pack_record(
MI_INFO*, uchar *,my_off_t, my_bool);
629 uchar *
to, uchar *from, ulong reclength);
630 extern ulonglong mi_safe_mul(ulonglong a,ulonglong b);
631 extern int _mi_ft_update(
MI_INFO *info, uint keynr, uchar *keybuf,
632 const uchar *oldrec,
const uchar *newrec, my_off_t pos);
638 uchar header[MI_BLOCK_INFO_HEADER_LENGTH];
644 my_off_t next_filepos;
645 my_off_t prev_filepos;
652 #define BLOCK_FIRST 1
654 #define BLOCK_DELETED 4
655 #define BLOCK_ERROR 8
656 #define BLOCK_SYNC_ERROR 16
657 #define BLOCK_FATAL_ERROR 32
659 #define NEED_MEM ((uint) 10*4*(IO_SIZE+32)+32)
661 #define BUFFERS_WHEN_SORTING 16
662 #define WRITE_COUNT MY_HOW_OFTEN_TO_WRITE
663 #define INDEX_TMP_EXT ".TMM"
664 #define DATA_TMP_EXT ".TMD"
666 #define UPDATE_TIME 1
667 #define UPDATE_STAT 2
668 #define UPDATE_SORT 4
669 #define UPDATE_AUTO_INC 8
670 #define UPDATE_OPEN_COUNT 16
672 #define USE_BUFFER_INIT (((1024L*512L-MALLOC_OVERHEAD)/IO_SIZE)*IO_SIZE)
673 #define READ_BUFFER_INIT (1024L*256L-MALLOC_OVERHEAD)
674 #define SORT_BUFFER_INIT (2048L*1024L-MALLOC_OVERHEAD)
675 #define MIN_SORT_BUFFER (4096-MALLOC_OVERHEAD)
677 enum myisam_log_commands {
678 MI_LOG_OPEN,MI_LOG_WRITE,MI_LOG_UPDATE,MI_LOG_DELETE,MI_LOG_CLOSE,MI_LOG_EXTRA,MI_LOG_LOCK,MI_LOG_DELETE_ALL
681 #define myisam_log(a,b,c,d) if (myisam_log_file >= 0) _myisam_log(a,b,c,d)
682 #define myisam_log_command(a,b,c,d,e) if (myisam_log_file >= 0) _myisam_log_command(a,b,c,d,e)
683 #define myisam_log_record(a,b,c,d,e) if (myisam_log_file >= 0) _myisam_log_record(a,b,c,d,e)
685 #define fast_mi_writeinfo(INFO) if (!(INFO)->s->tot_locks) (void) _mi_writeinfo((INFO),0)
686 #define fast_mi_readinfo(INFO) ((INFO)->lock_type == F_UNLCK) && _mi_readinfo((INFO),F_RDLCK,1)
692 extern uint _mi_get_block_info(
MI_BLOCK_INFO *,File, my_off_t);
693 extern uint _mi_rec_pack(
MI_INFO *info,uchar *
to,
const uchar *from);
696 File
file, my_off_t filepos);
697 extern void _mi_store_blob_length(uchar *pos,uint pack_length,uint length);
698 extern void _myisam_log(
enum myisam_log_commands command,
MI_INFO *info,
699 const uchar *buffert,uint length);
700 extern void _myisam_log_command(
enum myisam_log_commands command,
701 MI_INFO *info,
const uchar *buffert,
702 uint length,
int result);
703 extern void _myisam_log_record(
enum myisam_log_commands command,
MI_INFO *info,
704 const uchar *
record,my_off_t filepos,
706 extern void mi_report_error(
int errcode,
const char *file_name);
707 extern my_bool _mi_memmap_file(
MI_INFO *info);
708 extern void _mi_unmap_file(
MI_INFO *info);
709 extern uint save_pack_length(uint version, uchar *block_buff, ulong length);
710 extern uint read_pack_length(uint version,
const uchar *
buf, ulong *length);
711 extern uint calc_pack_length(uint version, ulong length);
713 size_t Count, my_off_t
offset, myf MyFlags);
714 extern size_t mi_mmap_pwrite(
MI_INFO *info,
const uchar *
Buffer,
715 size_t Count, my_off_t
offset, myf MyFlags);
717 size_t Count, my_off_t
offset, myf MyFlags);
718 extern size_t mi_nommap_pwrite(
MI_INFO *info,
const uchar *
Buffer,
719 size_t Count, my_off_t
offset, myf MyFlags);
725 uchar *my_n_base_info_read(uchar *ptr,
MI_BASE_INFO *base);
727 uchar *mi_keyseg_read(uchar *ptr,
HA_KEYSEG *keyseg);
729 uchar *mi_keydef_read(uchar *ptr,
MI_KEYDEF *keydef);
731 uchar *mi_uniquedef_read(uchar *ptr,
MI_UNIQUEDEF *keydef);
733 uchar *mi_recinfo_read(uchar *ptr,
MI_COLUMNDEF *recinfo);
734 extern int mi_disable_indexes(
MI_INFO *info);
735 extern int mi_enable_indexes(
MI_INFO *info);
736 extern int mi_indexes_are_disabled(
MI_INFO *info);
737 ulong _my_calc_total_blob_length(
MI_INFO *info,
const uchar *
record);
738 ha_checksum mi_checksum(
MI_INFO *info,
const uchar *
buf);
739 ha_checksum mi_static_checksum(
MI_INFO *info,
const uchar *
buf);
741 ha_checksum unique_hash, my_off_t pos);
744 const uchar *
record, my_off_t pos);
746 const uchar *
record, my_off_t pos);
747 int mi_unique_comp(
MI_UNIQUEDEF *def,
const uchar *a,
const uchar *b,
748 my_bool null_are_equal);
749 void mi_get_status(
void* param,
int concurrent_insert);
750 void mi_update_status(
void* param);
751 void mi_restore_status(
void* param);
752 void mi_copy_status(
void*
to,
void *from);
753 my_bool mi_check_status(
void* param);
754 void mi_disable_non_unique_index(
MI_INFO *info, ha_rows rows);
756 extern MI_INFO *test_if_reopen(
char *filename);
757 my_bool check_table_is_closed(
const char *
name,
const char *where);
763 my_bool mi_dynmap_file(
MI_INFO *info, my_off_t
size);
764 int mi_munmap_file(
MI_INFO *info);
767 const char *sfile, uint sline);
769 int mi_check_index_cond(
register MI_INFO *info, uint keynr, uchar *
record);
772 volatile int *killed_ptr(
MI_CHECK *param);
773 void mi_check_print_error(
MI_CHECK *param,
const char *
fmt,...);
774 void mi_check_print_warning(
MI_CHECK *param,
const char *
fmt,...);
775 void mi_check_print_info(
MI_CHECK *param,
const char *
fmt,...);
779 pthread_handler_t thr_find_all_keys(
void *arg);
783 int _create_index_by_sort(
MI_SORT_PARAM *info, my_bool no_messages, ulonglong);
785 extern void mi_set_index_cond_func(
MI_INFO *info, index_cond_func_t func,
791 #ifdef HAVE_PSI_INTERFACE
793 extern PSI_mutex_key mi_key_mutex_MYISAM_SHARE_intern_lock,
794 mi_key_mutex_MI_SORT_INFO_mutex, mi_key_mutex_MI_CHECK_print_msg;
796 extern PSI_rwlock_key mi_key_rwlock_MYISAM_SHARE_key_root_lock,
797 mi_key_rwlock_MYISAM_SHARE_mmap_lock;
799 extern PSI_cond_key mi_key_cond_MI_SORT_INFO_cond;
801 extern PSI_file_key mi_key_file_datatmp, mi_key_file_dfile, mi_key_file_kfile,
804 extern PSI_thread_key mi_key_thread_find_all_keys;
806 void init_myisam_psi_keys();