|
#define | MI_STATE_INFO_SIZE (24 + 14 * 8 + 7 * 4 + 2 * 2 + 8) |
|
#define | MI_STATE_KEY_SIZE 8 |
|
#define | MI_STATE_KEYBLOCK_SIZE 8 |
|
#define | MI_STATE_KEYSEG_SIZE 4 |
|
#define | MI_STATE_EXTRA_SIZE |
|
#define | MI_KEYDEF_SIZE (2 + 5 * 2) |
|
#define | MI_UNIQUEDEF_SIZE (2 + 1 + 1) |
|
#define | HA_KEYSEG_SIZE (6 + 2 * 2 + 4 * 2) |
|
#define | MI_COLUMNDEF_SIZE (2 * 3 + 1) |
|
#define | MI_BASE_INFO_SIZE (5 * 8 + 8 * 4 + 4 + 4 * 2 + 16) |
|
#define | MI_INDEX_BLOCK_MARGIN 16 /* Safety margin for .MYI tables */ |
|
#define | MAX_NONMAPPED_INSERTS 1000 |
|
#define | USE_WHOLE_KEY MI_MAX_KEY_BUFF * 2 /* Use whole key in _mi_search() */ |
|
#define | F_EXTRA_LCK -1 |
|
#define | MEMMAP_USED 32 |
|
#define | REMEMBER_OLD_POS 64 |
|
#define | WRITEINFO_UPDATE_KEYFILE 1 |
|
#define | WRITEINFO_NO_UNLOCK 2 |
|
#define | USE_PACKED_KEYS 1 |
|
#define | RRND_PRESERVE_LASTINX 2 |
|
#define | STATE_CHANGED 1 |
|
#define | STATE_CRASHED 2 |
|
#define | STATE_CRASHED_ON_REPAIR 4 |
|
#define | STATE_NOT_ANALYZED 8 |
|
#define | STATE_NOT_OPTIMIZED_KEYS 16 |
|
#define | STATE_NOT_SORTED_PAGES 32 |
|
#define | READING_NEXT 1 |
|
#define | READING_HEADER 2 |
|
#define | mi_getint(x) ((uint)mi_uint2korr(x) & 32767) |
|
#define | mi_putint(x, y, nod) |
|
#define | mi_test_if_nod(x) (x[0] & 128 ? info->s->base.key_reflength : 0) |
|
#define | mi_report_crashed(A, B) _mi_report_crashed((A), (B), __FILE__, __LINE__) |
|
#define | mi_mark_crashed(x) |
|
#define | mi_mark_crashed_on_repair(x) |
|
#define | mi_is_crashed(x) ((x)->s->state.changed & STATE_CRASHED) |
|
#define | mi_is_crashed_on_repair(x) ((x)->s->state.changed & STATE_CRASHED_ON_REPAIR) |
|
#define | mi_print_error(SHARE, ERRNO) mi_report_error((ERRNO), (SHARE)->index_file_name) |
|
#define | store_key_length(key, length) |
|
#define | get_key_full_length(length, key) |
|
#define | get_key_full_length_rdonly(length, key) |
|
#define | get_pack_length(length) ((length) >= 255 ? 3 : 1) |
|
#define | MI_MIN_BLOCK_LENGTH 20U /* Because of delete-link */ |
|
#define | MI_EXTEND_BLOCK_LENGTH 20 /* Don't use to small record-blocks */ |
|
#define | MI_SPLIT_LENGTH ((MI_EXTEND_BLOCK_LENGTH + 4) * 2) |
|
#define | MI_MAX_DYN_BLOCK_HEADER 20 /* Max prefix of record-block */ |
|
#define | MI_BLOCK_INFO_HEADER_LENGTH 20 |
|
#define | MI_DYN_DELETE_BLOCK_HEADER 20 /* length of delete-block-header */ |
|
#define | MI_DYN_MAX_BLOCK_LENGTH ((1L << 24) - 4L) |
|
#define | MI_DYN_MAX_ROW_LENGTH (MI_DYN_MAX_BLOCK_LENGTH - MI_SPLIT_LENGTH) |
|
#define | MI_DYN_ALIGN_SIZE 4 /* Align blocks on this */ |
|
#define | MI_MAX_DYN_HEADER_BYTE 13 /* max header byte for dynamic rows */ |
|
#define | MI_MAX_BLOCK_LENGTH ((((ulong)1 << 24) - 1) & (~(ulong)(MI_DYN_ALIGN_SIZE - 1))) |
|
#define | MI_REC_BUFF_OFFSET ALIGN_SIZE(MI_DYN_DELETE_BLOCK_HEADER + sizeof(uint32)) |
|
#define | PACK_TYPE_SELECTED 1 /* Bits in field->pack_type */ |
|
#define | PACK_TYPE_SPACE_FIELDS 2 |
|
#define | PACK_TYPE_ZERO_FILL 4 |
|
#define | MI_FOUND_WRONG_KEY 32738 /* Impossible value from ha_key_cmp */ |
|
#define | MI_MAX_KEY_BLOCK_SIZE (MI_MAX_KEY_BLOCK_LENGTH / MI_MIN_KEY_BLOCK_LENGTH) |
|
#define | MI_BLOCK_SIZE(key_length, data_pointer, key_pointer, block_size) |
|
#define | MI_MAX_KEYPTR_SIZE 5 /* For calculating block lengths */ |
|
#define | MI_MIN_KEYBLOCK_LENGTH 50 /* When to split delete blocks */ |
|
#define | MI_MIN_SIZE_BULK_INSERT_TREE 16384 /* this is per key */ |
|
#define | MI_MIN_ROWS_TO_USE_BULK_INSERT 100 |
|
#define | MI_MIN_ROWS_TO_DISABLE_INDEXES 100 |
|
#define | MI_MIN_ROWS_TO_USE_WRITE_CACHE 10 |
|
#define | MI_UNIQUE_HASH_TYPE HA_KEYTYPE_ULONG_INT |
|
#define | mi_unique_store(A, B) mi_int4store((A), (B)) |
|
#define | mi_get_rec_buff_ptr(info, buf) |
|
#define | mi_get_rec_buff_len(info, buf) (*((uint32 *)(mi_get_rec_buff_ptr(info, buf)))) |
|
#define | BLOCK_FIRST 1 |
|
#define | BLOCK_LAST 2 |
|
#define | BLOCK_DELETED 4 |
|
#define | BLOCK_ERROR 8 /* Wrong data */ |
|
#define | BLOCK_SYNC_ERROR 16 /* Right data at wrong place */ |
|
#define | BLOCK_FATAL_ERROR 32 /* hardware-error */ |
|
#define | NEED_MEM |
|
#define | MAXERR 20 |
|
#define | BUFFERS_WHEN_SORTING 16 /* Alloc for sort-key-tree */ |
|
#define | MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */ |
|
#define | WRITE_COUNT MY_HOW_OFTEN_TO_WRITE |
|
#define | INDEX_TMP_EXT ".TMM" |
|
#define | DATA_TMP_EXT ".TMD" |
|
#define | UPDATE_TIME 1 |
|
#define | UPDATE_STAT 2 |
|
#define | UPDATE_SORT 4 |
|
#define | UPDATE_AUTO_INC 8 |
|
#define | UPDATE_OPEN_COUNT 16 |
|
#define | USE_BUFFER_INIT (((1024L * 512L - MALLOC_OVERHEAD) / IO_SIZE) * IO_SIZE) |
|
#define | READ_BUFFER_INIT (1024L * 256L - MALLOC_OVERHEAD) |
|
#define | SORT_BUFFER_INIT (2048L * 1024L - MALLOC_OVERHEAD) |
|
#define | MIN_SORT_BUFFER (4096ULL - MALLOC_OVERHEAD) |
|
#define | myisam_log(a, b, c, d) if (myisam_log_file >= 0) _myisam_log(a, b, c, d) |
|
#define | myisam_log_command(a, b, c, d, e) if (myisam_log_file >= 0) _myisam_log_command(a, b, c, d, e) |
|
#define | myisam_log_record(a, b, c, d, e) if (myisam_log_file >= 0) _myisam_log_record(a, b, c, d, e) |
|
#define | fast_mi_writeinfo(INFO) if (!(INFO)->s->tot_locks) (void)_mi_writeinfo((INFO), 0) |
|
#define | fast_mi_readinfo(INFO) ((INFO)->lock_type == F_UNLCK) && _mi_readinfo((INFO), F_RDLCK, 1) |
|
|
int | _mi_read_dynamic_record (MI_INFO *info, my_off_t filepos, uchar *buf) |
|
int | _mi_write_dynamic_record (MI_INFO *, const uchar *) |
|
int | _mi_update_dynamic_record (MI_INFO *, my_off_t, const uchar *) |
|
int | _mi_delete_dynamic_record (MI_INFO *info) |
|
int | _mi_cmp_dynamic_record (MI_INFO *info, const uchar *record) |
|
int | _mi_read_rnd_dynamic_record (MI_INFO *, uchar *, my_off_t, bool) |
|
int | _mi_write_blob_record (MI_INFO *, const uchar *) |
|
int | _mi_update_blob_record (MI_INFO *, my_off_t, const uchar *) |
|
int | _mi_read_static_record (MI_INFO *info, my_off_t filepos, uchar *buf) |
|
int | _mi_write_static_record (MI_INFO *, const uchar *) |
|
int | _mi_update_static_record (MI_INFO *, my_off_t, const uchar *) |
|
int | _mi_delete_static_record (MI_INFO *info) |
|
int | _mi_cmp_static_record (MI_INFO *info, const uchar *record) |
|
int | _mi_read_rnd_static_record (MI_INFO *, uchar *, my_off_t, bool) |
|
int | _mi_ck_write (MI_INFO *info, uint keynr, uchar *key, uint length) |
|
int | _mi_ck_real_write_btree (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, my_off_t *root, uint comp_flag) |
|
int | _mi_enlarge_root (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, my_off_t *root) |
|
int | _mi_insert (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uchar *anc_buff, uchar *key_pos, uchar *key_buff, uchar *father_buff, uchar *father_keypos, my_off_t father_page, bool insert_last) |
|
int | _mi_split_page (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uchar *buff, uchar *key_buff, bool insert_last) |
|
uchar * | _mi_find_half_pos (uint nod_flag, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint *return_key_length, uchar **after_key) |
|
int | _mi_calc_static_key_length (MI_KEYDEF *keyinfo, uint nod_flag, const uchar *key_pos, uchar *org_key, uchar *key_buff, const uchar *key, MI_KEY_PARAM *s_temp) |
|
int | _mi_calc_var_key_length (MI_KEYDEF *keyinfo, uint nod_flag, const uchar *key_pos, uchar *org_key, uchar *key_buff, const uchar *key, MI_KEY_PARAM *s_temp) |
|
int | _mi_calc_var_pack_key_length (MI_KEYDEF *keyinfo, uint nod_flag, const uchar *key_pos, uchar *org_key, uchar *prev_key, const uchar *key, MI_KEY_PARAM *s_temp) |
|
int | _mi_calc_bin_pack_key_length (MI_KEYDEF *keyinfo, uint nod_flag, const uchar *key_pos, uchar *org_key, uchar *prev_key, const uchar *key, MI_KEY_PARAM *s_temp) |
|
void | _mi_store_static_key (MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp) |
|
void | _mi_store_var_pack_key (MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp) |
|
void | _mi_store_bin_pack_key (MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp) |
|
int | _mi_ck_delete (MI_INFO *info, uint keynr, uchar *key, uint key_length) |
|
int | _mi_readinfo (MI_INFO *info, int lock_flag, int check_keybuffer) |
|
int | _mi_writeinfo (MI_INFO *info, uint options) |
|
int | _mi_test_if_changed (MI_INFO *info) |
|
int | _mi_mark_file_changed (MI_INFO *info) |
|
int | _mi_decrement_open_count (MI_INFO *info) |
|
int | _mi_check_index (MI_INFO *info, int inx) |
|
int | _mi_search (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_len, uint nextflag, my_off_t pos) |
|
int | _mi_bin_search (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff, bool *was_last_key) |
|
int | _mi_seq_search (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff, bool *was_last_key) |
|
int | _mi_prefix_search (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff, bool *was_last_key) |
|
my_off_t | _mi_kpos (uint nod_flag, uchar *after_key) |
|
void | _mi_kpointer (MI_INFO *info, uchar *buff, my_off_t pos) |
|
my_off_t | _mi_dpos (MI_INFO *info, uint nod_flag, const uchar *after_key) |
|
my_off_t | _mi_rec_pos (MYISAM_SHARE *info, uchar *ptr) |
|
void | _mi_dpointer (MI_INFO *info, uchar *buff, my_off_t pos) |
|
uint | _mi_get_static_key (MI_KEYDEF *keyinfo, uint nod_flag, uchar **page, uchar *key) |
|
uint | _mi_get_pack_key (MI_KEYDEF *keyinfo, uint nod_flag, uchar **page, uchar *key) |
|
uint | _mi_get_binary_pack_key (MI_KEYDEF *keyinfo, uint nod_flag, uchar **page_pos, uchar *key) |
|
uchar * | _mi_get_last_key (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *keypos, uchar *lastkey, uchar *endpos, uint *return_key_length) |
|
uchar * | _mi_get_key (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uchar *keypos, uint *return_key_length) |
|
uint | _mi_keylength (MI_KEYDEF *keyinfo, const uchar *key) |
|
uint | _mi_keylength_part (MI_KEYDEF *keyinfo, const uchar *key, HA_KEYSEG *end) |
|
uchar * | _mi_move_key (MI_KEYDEF *keyinfo, uchar *to, const uchar *from) |
|
int | _mi_search_next (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, uint nextflag, my_off_t pos) |
|
int | _mi_search_first (MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos) |
|
int | _mi_search_last (MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos) |
|
uchar * | _mi_fetch_keypage (MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t page, int level, uchar *buff, int return_buffer) |
|
int | _mi_write_keypage (MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t page, int level, uchar *buff) |
|
int | _mi_dispose (MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos, int level) |
|
my_off_t | _mi_new (MI_INFO *info, MI_KEYDEF *keyinfo, int level) |
|
uint | _mi_make_key (MI_INFO *info, uint keynr, uchar *key, const uchar *record, my_off_t filepos) |
|
uint | _mi_pack_key (MI_INFO *info, uint keynr, uchar *key, const uchar *old, key_part_map keypart_map, HA_KEYSEG **last_used_keyseg) |
|
int | _mi_read_key_record (MI_INFO *info, my_off_t filepos, uchar *buf) |
|
int | _mi_read_cache (IO_CACHE *info, uchar *buff, my_off_t pos, uint length, int re_read_if_possibly) |
|
ulonglong | retrieve_auto_increment (MI_INFO *info, const uchar *record) |
|
uchar * | mi_alloc_rec_buff (MI_INFO *, ulong, uchar **) |
|
size_t | _mi_rec_unpack (MI_INFO *info, uchar *to, const uchar *from, ulong reclength) |
|
bool | _mi_rec_check (MI_INFO *info, const uchar *record, uchar *packpos, ulong packed_length, bool with_checkum) |
|
int | _mi_write_part_record (MI_INFO *info, my_off_t filepos, ulong length, my_off_t next_filepos, uchar **record, ulong *reclength, int *flag) |
|
void | _mi_print_key (FILE *stream, HA_KEYSEG *keyseg, const uchar *key, uint length) |
|
bool | _mi_read_pack_info (MI_INFO *info, bool fix_keys) |
|
int | _mi_read_pack_record (MI_INFO *info, my_off_t filepos, uchar *buf) |
|
int | _mi_read_rnd_pack_record (MI_INFO *, uchar *, my_off_t, bool) |
|
int | _mi_pack_rec_unpack (MI_INFO *info, MI_BIT_BUFF *bit_buff, uchar *to, uchar *from, ulong reclength) |
|
ulonglong | mi_safe_mul (ulonglong a, ulonglong b) |
|
int | _mi_ft_update (MI_INFO *info, uint keynr, uchar *keybuf, const uchar *oldrec, const uchar *newrec, my_off_t pos) |
|
uint | _mi_get_block_info (MI_BLOCK_INFO *, File, my_off_t) |
|
uint | _mi_rec_pack (MI_INFO *info, uchar *to, const uchar *from) |
|
uint | _mi_pack_get_block_info (MI_INFO *myisam, MI_BIT_BUFF *bit_buff, MI_BLOCK_INFO *info, uchar **rec_buff_p, File file, my_off_t filepos) |
|
void | _mi_store_blob_length (uchar *pos, uint pack_length, uint length) |
|
void | _myisam_log (enum myisam_log_commands command, MI_INFO *info, const uchar *buffert, uint length) |
|
void | _myisam_log_command (enum myisam_log_commands command, MI_INFO *info, const uchar *buffert, uint length, int result) |
|
void | _myisam_log_record (enum myisam_log_commands command, MI_INFO *info, const uchar *record, my_off_t filepos, int result) |
|
void | mi_report_error (int errcode, const char *file_name) |
|
bool | _mi_memmap_file (MI_INFO *info) |
|
void | _mi_unmap_file (MI_INFO *info) |
|
uint | save_pack_length (uint version, uchar *block_buff, ulong length) |
|
uint | read_pack_length (uint version, const uchar *buf, ulong *length) |
|
uint | calc_pack_length (uint version, ulong length) |
|
size_t | mi_mmap_pread (MI_INFO *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) |
|
size_t | mi_mmap_pwrite (MI_INFO *info, const uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) |
|
size_t | mi_nommap_pread (MI_INFO *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) |
|
size_t | mi_nommap_pwrite (MI_INFO *info, const uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) |
|
uint | mi_state_info_write (File file, MI_STATE_INFO *state, uint pWrite) |
|
uchar * | mi_state_info_read (uchar *ptr, MI_STATE_INFO *state) |
|
uint | mi_state_info_read_dsk (File file, MI_STATE_INFO *state, bool pRead) |
|
uint | mi_base_info_write (File file, MI_BASE_INFO *base) |
|
uchar * | my_n_base_info_read (uchar *ptr, MI_BASE_INFO *base) |
|
int | mi_keyseg_write (File file, const HA_KEYSEG *keyseg) |
|
uchar * | mi_keyseg_read (uchar *ptr, HA_KEYSEG *keyseg) |
|
uint | mi_keydef_write (File file, MI_KEYDEF *keydef) |
|
uchar * | mi_keydef_read (uchar *ptr, MI_KEYDEF *keydef) |
|
uint | mi_uniquedef_write (File file, MI_UNIQUEDEF *keydef) |
|
uchar * | mi_uniquedef_read (uchar *ptr, MI_UNIQUEDEF *keydef) |
|
uint | mi_recinfo_write (File file, MI_COLUMNDEF *recinfo) |
|
uchar * | mi_recinfo_read (uchar *ptr, MI_COLUMNDEF *recinfo) |
|
int | mi_disable_indexes (MI_INFO *info) |
|
int | mi_enable_indexes (MI_INFO *info) |
|
int | mi_indexes_are_disabled (MI_INFO *info) |
|
ulong | _my_calc_total_blob_length (MI_INFO *info, const uchar *record) |
|
ha_checksum | mi_checksum (MI_INFO *info, const uchar *buf) |
|
ha_checksum | mi_static_checksum (MI_INFO *info, const uchar *buf) |
|
bool | mi_check_unique (MI_INFO *info, MI_UNIQUEDEF *def, uchar *record, ha_checksum unique_hash, my_off_t pos) |
|
ha_checksum | mi_unique_hash (MI_UNIQUEDEF *def, const uchar *buf) |
|
int | _mi_cmp_static_unique (MI_INFO *info, MI_UNIQUEDEF *def, const uchar *record, my_off_t pos) |
|
int | _mi_cmp_dynamic_unique (MI_INFO *info, MI_UNIQUEDEF *def, const uchar *record, my_off_t pos) |
|
int | mi_unique_comp (MI_UNIQUEDEF *def, const uchar *a, const uchar *b, bool null_are_equal) |
|
void | mi_get_status (void *param, int concurrent_insert) |
|
void | mi_update_status (void *param) |
|
void | mi_restore_status (void *param) |
|
void | mi_copy_status (void *to, void *from) |
|
bool | mi_check_status (void *param) |
|
MI_INFO * | test_if_reopen (char *filename) |
|
bool | check_table_is_closed (const char *name, const char *where) |
|
int | mi_open_datafile (MI_INFO *info, MYISAM_SHARE *share, const char *orn_name, File file_to_dup) |
|
int | mi_open_keyfile (MYISAM_SHARE *share) |
|
void | mi_setup_functions (MYISAM_SHARE *share) |
|
bool | mi_dynmap_file (MI_INFO *info, my_off_t size) |
|
int | mi_munmap_file (MI_INFO *info) |
|
void | mi_remap_file (MI_INFO *info, my_off_t size) |
|
void | _mi_report_crashed (MI_INFO *file, const char *message, const char *sfile, uint sline) |
| Report list of threads (and queries) accessing a table, thread_id of a thread that detected corruption, ource file name and line number where this corruption was detected, optional extra information (string). More...
|
|
int | mi_check_index_cond (MI_INFO *info, uint keynr, uchar *record) |
|
volatile int * | killed_ptr (MI_CHECK *param) |
|
void | mi_check_print_error (MI_CHECK *param, const char *fmt,...) |
|
void | mi_check_print_warning (MI_CHECK *param, const char *fmt,...) |
|
void | mi_check_print_info (MI_CHECK *param, const char *fmt,...) |
|
int | flush_pending_blocks (MI_SORT_PARAM *param) |
|
int | sort_ft_buf_flush (MI_SORT_PARAM *sort_param) |
|
int | flush_blocks (MI_CHECK *param, KEY_CACHE *key_cache, File file) |
|
int | sort_write_record (MI_SORT_PARAM *sort_param) |
|
int | _create_index_by_sort (MI_SORT_PARAM *info, bool no_messages, ulonglong) |
|
void | mi_set_index_cond_func (MI_INFO *info, index_cond_func_t func, void *func_arg) |
|
void | init_myisam_psi_keys () |
|