MySQL  8.0.17
Source Code Documentation
myisamdef.h File Reference
#include "my_alloc.h"
#include "my_icp.h"
#include "my_pointer_arithmetic.h"
#include "myisam.h"
#include "myisampack.h"
#include "mysql/psi/mysql_file.h"
#include "mysql/psi/mysql_rwlock.h"
#include "mysql/psi/mysql_thread.h"
#include "thr_lock.h"

Go to the source code of this file.

Classes

struct  MI_STATUS_INFO
 
struct  MI_STATE_INFO
 
struct  MI_BASE_INFO
 
struct  MI_BLOB
 
struct  MI_PACK
 
struct  MYISAM_SHARE
 
struct  MI_BIT_BUFF
 
struct  MI_INFO
 
struct  BUFFPEK
 
struct  MI_SORT_PARAM
 
struct  MI_KEY_PARAM
 
struct  MI_BLOCK_INFO
 

Macros

#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   20 /* 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   ((uint)10 * 4 * (IO_SIZE + 32) + 32) /* Nead for recursion */
 
#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   (4096 - 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)
 

Typedefs

typedef uint mi_bit_type
 
typedef ICP_RESULT(* index_cond_func_t) (void *param)
 

Enumerations

enum  myisam_log_commands {
  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
}
 

Functions

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)
 
ucharmi_alloc_rec_buff (MI_INFO *, ulong, uchar **)
 
ulong _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)
 
ucharmi_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)
 
ucharmy_n_base_info_read (uchar *ptr, MI_BASE_INFO *base)
 
int mi_keyseg_write (File file, const HA_KEYSEG *keyseg)
 
ucharmi_keyseg_read (uchar *ptr, HA_KEYSEG *keyseg)
 
uint mi_keydef_write (File file, MI_KEYDEF *keydef)
 
ucharmi_keydef_read (uchar *ptr, MI_KEYDEF *keydef)
 
uint mi_uniquedef_write (File file, MI_UNIQUEDEF *keydef)
 
ucharmi_uniquedef_read (uchar *ptr, MI_UNIQUEDEF *keydef)
 
uint mi_recinfo_write (File file, MI_COLUMNDEF *recinfo)
 
ucharmi_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_INFOtest_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 thr_write_keys (MI_SORT_PARAM *sort_param)
 
void * thr_find_all_keys (void *arg)
 
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 ()
 

Variables

mysql_mutex_t THR_LOCK_myisam
 
LISTmyisam_open_list
 
uchar myisam_file_magic []
 
uchar myisam_pack_file_magic []
 
uint myisam_read_vec []
 
uint myisam_readnext_vec []
 
uint myisam_quick_table_bits
 
File myisam_log_file
 
ulong myisam_pid
 
thread_local st_keycache_thread_varkeycache_tls
 
PSI_mutex_key mi_key_mutex_MYISAM_SHARE_intern_lock
 
PSI_mutex_key mi_key_mutex_MI_SORT_INFO_mutex
 
PSI_mutex_key mi_key_mutex_MI_CHECK_print_msg
 
PSI_rwlock_key mi_key_rwlock_MYISAM_SHARE_key_root_lock
 
PSI_rwlock_key mi_key_rwlock_MYISAM_SHARE_mmap_lock
 
PSI_cond_key mi_key_cond_MI_SORT_INFO_cond
 
PSI_cond_key mi_keycache_thread_var_suspend
 
PSI_file_key mi_key_file_datatmp
 
PSI_file_key mi_key_file_dfile
 
PSI_file_key mi_key_file_kfile
 
PSI_file_key mi_key_file_log
 
PSI_thread_key mi_key_thread_find_all_keys
 
PSI_memory_key mi_key_memory_MYISAM_SHARE
 
PSI_memory_key mi_key_memory_MI_INFO
 
PSI_memory_key mi_key_memory_MI_INFO_ft1_to_ft2
 
PSI_memory_key mi_key_memory_MI_INFO_bulk_insert
 
PSI_memory_key mi_key_memory_record_buffer
 
PSI_memory_key mi_key_memory_FTB
 
PSI_memory_key mi_key_memory_FT_INFO
 
PSI_memory_key mi_key_memory_FTPARSER_PARAM
 
PSI_memory_key mi_key_memory_ft_memroot
 
PSI_memory_key mi_key_memory_ft_stopwords
 
PSI_memory_key mi_key_memory_MI_SORT_PARAM
 
PSI_memory_key mi_key_memory_MI_SORT_PARAM_wordroot
 
PSI_memory_key mi_key_memory_SORT_FT_BUF
 
PSI_memory_key mi_key_memory_SORT_KEY_BLOCKS
 
PSI_memory_key mi_key_memory_filecopy
 
PSI_memory_key mi_key_memory_SORT_INFO_buffer
 
PSI_memory_key mi_key_memory_MI_DECODE_TREE
 
PSI_memory_key mi_key_memory_MYISAM_SHARE_decode_tables
 
PSI_memory_key mi_key_memory_preload_buffer
 
PSI_memory_key mi_key_memory_stPageList_pages
 
PSI_memory_key mi_key_memory_keycache_thread_var
 
PSI_memory_key key_memory_QUEUE
 

Macro Definition Documentation

◆ BLOCK_DELETED

#define BLOCK_DELETED   4

◆ BLOCK_ERROR

#define BLOCK_ERROR   8 /* Wrong data */

◆ BLOCK_FATAL_ERROR

#define BLOCK_FATAL_ERROR   32 /* hardware-error */

◆ BLOCK_FIRST

#define BLOCK_FIRST   1

◆ BLOCK_LAST

#define BLOCK_LAST   2

◆ BLOCK_SYNC_ERROR

#define BLOCK_SYNC_ERROR   16 /* Right data at wrong place */

◆ BUFFERS_WHEN_SORTING

#define BUFFERS_WHEN_SORTING   16 /* Alloc for sort-key-tree */

◆ DATA_TMP_EXT

#define DATA_TMP_EXT   ".TMD"

◆ F_EXTRA_LCK

#define F_EXTRA_LCK   -1

◆ fast_mi_readinfo

#define fast_mi_readinfo (   INFO)    ((INFO)->lock_type == F_UNLCK) && _mi_readinfo((INFO), F_RDLCK, 1)

◆ fast_mi_writeinfo

#define fast_mi_writeinfo (   INFO)    if (!(INFO)->s->tot_locks) (void)_mi_writeinfo((INFO), 0)

◆ get_key_full_length

#define get_key_full_length (   length,
  key 
)
Value:
{ \
if ((uchar) * (key) != 255) \
length = ((uint)(uchar) * ((key)++)) + 1; \
else { \
length = mi_uint2korr((key) + 1) + 3; \
(key) += 3; \
} \
}
unsigned char uchar
Definition: my_inttypes.h:51
unsigned int uint
Definition: uca-dump.cc:29
static const char * key
Definition: suite_stubs.c:14
static uint16 mi_uint2korr(const uchar *A)
Definition: myisampack.h:65

◆ get_key_full_length_rdonly

#define get_key_full_length_rdonly (   length,
  key 
)
Value:
{ \
if ((uchar) * (key) != 255) \
length = ((uint)(uchar) * ((key))) + 1; \
else { \
length = mi_uint2korr((key) + 1) + 3; \
} \
}
unsigned char uchar
Definition: my_inttypes.h:51
unsigned int uint
Definition: uca-dump.cc:29
static const char * key
Definition: suite_stubs.c:14
static uint16 mi_uint2korr(const uchar *A)
Definition: myisampack.h:65

◆ get_pack_length

#define get_pack_length (   length)    ((length) >= 255 ? 3 : 1)

◆ HA_KEYSEG_SIZE

#define HA_KEYSEG_SIZE   (6 + 2 * 2 + 4 * 2)

◆ INDEX_TMP_EXT

#define INDEX_TMP_EXT   ".TMM"

◆ MAX_NONMAPPED_INSERTS

#define MAX_NONMAPPED_INSERTS   1000

◆ MAXERR

#define MAXERR   20

◆ MEMMAP_USED

#define MEMMAP_USED   32

◆ MI_BASE_INFO_SIZE

#define MI_BASE_INFO_SIZE   (5 * 8 + 8 * 4 + 4 + 4 * 2 + 16)

◆ MI_BLOCK_INFO_HEADER_LENGTH

#define MI_BLOCK_INFO_HEADER_LENGTH   20

◆ MI_BLOCK_SIZE

#define MI_BLOCK_SIZE (   key_length,
  data_pointer,
  key_pointer,
  block_size 
)
Value:
(((((key_length) + (data_pointer) + (key_pointer)) * 4 + (key_pointer) + \
2) / \
(block_size) + \
1) * \
(block_size))
static uint key_length
Definition: mi_test1.cc:42

◆ MI_COLUMNDEF_SIZE

#define MI_COLUMNDEF_SIZE   (2 * 3 + 1)

◆ MI_DYN_ALIGN_SIZE

#define MI_DYN_ALIGN_SIZE   4 /* Align blocks on this */

◆ MI_DYN_DELETE_BLOCK_HEADER

#define MI_DYN_DELETE_BLOCK_HEADER   20 /* length of delete-block-header */

◆ MI_DYN_MAX_BLOCK_LENGTH

#define MI_DYN_MAX_BLOCK_LENGTH   ((1L << 24) - 4L)

◆ MI_DYN_MAX_ROW_LENGTH

#define MI_DYN_MAX_ROW_LENGTH   (MI_DYN_MAX_BLOCK_LENGTH - MI_SPLIT_LENGTH)

◆ MI_EXTEND_BLOCK_LENGTH

#define MI_EXTEND_BLOCK_LENGTH   20 /* Don't use to small record-blocks */

◆ MI_FOUND_WRONG_KEY

#define MI_FOUND_WRONG_KEY   32738 /* Impossible value from ha_key_cmp */

◆ mi_get_rec_buff_len

#define mi_get_rec_buff_len (   info,
  buf 
)    (*((uint32 *)(mi_get_rec_buff_ptr(info, buf))))

◆ mi_get_rec_buff_ptr

#define mi_get_rec_buff_ptr (   info,
  buf 
)
Value:
((((info)->s->options & HA_OPTION_PACK_RECORD) && (buf)) \
: (buf))
#define MI_REC_BUFF_OFFSET
Definition: myisamdef.h:476
#define HA_OPTION_PACK_RECORD
Indicates that storage engine needs to use packed row format.
Definition: my_base.h:599
Log info(cout, "NOTE")

◆ mi_getint

#define mi_getint (   x)    ((uint)mi_uint2korr(x) & 32767)

◆ MI_INDEX_BLOCK_MARGIN

#define MI_INDEX_BLOCK_MARGIN   16 /* Safety margin for .MYI tables */

◆ mi_is_crashed

#define mi_is_crashed (   x)    ((x)->s->state.changed & STATE_CRASHED)

◆ mi_is_crashed_on_repair

#define mi_is_crashed_on_repair (   x)    ((x)->s->state.changed & STATE_CRASHED_ON_REPAIR)

◆ MI_KEYDEF_SIZE

#define MI_KEYDEF_SIZE   (2 + 5 * 2)

◆ mi_mark_crashed

#define mi_mark_crashed (   x)
Value:
do { \
(x)->s->state.changed |= STATE_CRASHED; \
DBUG_PRINT("error", ("Marked table crashed")); \
mi_report_crashed((x), 0); \
} while (0)
#define DBUG_PRINT(keyword, arglist)
Definition: my_dbug.h:165
#define STATE_CRASHED
Definition: myisamdef.h:394

◆ mi_mark_crashed_on_repair

#define mi_mark_crashed_on_repair (   x)
Value:
do { \
(x)->s->state.changed |= STATE_CRASHED | STATE_CRASHED_ON_REPAIR; \
(x)->update |= HA_STATE_CHANGED; \
DBUG_PRINT("error", ("Marked table crashed")); \
} while (0)
#define STATE_CRASHED_ON_REPAIR
Definition: myisamdef.h:395
#define STATE_CRASHED
Definition: myisamdef.h:394
#define HA_STATE_CHANGED
Definition: my_base.h:1031

◆ MI_MAX_BLOCK_LENGTH

#define MI_MAX_BLOCK_LENGTH   ((((ulong)1 << 24) - 1) & (~(ulong)(MI_DYN_ALIGN_SIZE - 1)))

◆ MI_MAX_DYN_BLOCK_HEADER

#define MI_MAX_DYN_BLOCK_HEADER   20 /* Max prefix of record-block */

◆ MI_MAX_DYN_HEADER_BYTE

#define MI_MAX_DYN_HEADER_BYTE   13 /* max header byte for dynamic rows */

◆ MI_MAX_KEY_BLOCK_SIZE

#define MI_MAX_KEY_BLOCK_SIZE   (MI_MAX_KEY_BLOCK_LENGTH / MI_MIN_KEY_BLOCK_LENGTH)

◆ MI_MAX_KEYPTR_SIZE

#define MI_MAX_KEYPTR_SIZE   5 /* For calculating block lengths */

◆ MI_MIN_BLOCK_LENGTH

#define MI_MIN_BLOCK_LENGTH   20 /* Because of delete-link */

◆ MI_MIN_KEYBLOCK_LENGTH

#define MI_MIN_KEYBLOCK_LENGTH   50 /* When to split delete blocks */

◆ MI_MIN_ROWS_TO_DISABLE_INDEXES

#define MI_MIN_ROWS_TO_DISABLE_INDEXES   100

◆ MI_MIN_ROWS_TO_USE_BULK_INSERT

#define MI_MIN_ROWS_TO_USE_BULK_INSERT   100

◆ MI_MIN_ROWS_TO_USE_WRITE_CACHE

#define MI_MIN_ROWS_TO_USE_WRITE_CACHE   10

◆ MI_MIN_SIZE_BULK_INSERT_TREE

#define MI_MIN_SIZE_BULK_INSERT_TREE   16384 /* this is per key */

◆ mi_print_error

#define mi_print_error (   SHARE,
  ERRNO 
)    mi_report_error((ERRNO), (SHARE)->index_file_name)

◆ mi_putint

#define mi_putint (   x,
  y,
  nod 
)
Value:
{ \
uint16 boh = (nod ? (uint16)32768 : 0) + (uint16)(y); \
mi_int2store(x, boh); \
}
uint16_t uint16
Definition: my_inttypes.h:60

◆ MI_REC_BUFF_OFFSET

#define MI_REC_BUFF_OFFSET   ALIGN_SIZE(MI_DYN_DELETE_BLOCK_HEADER + sizeof(uint32))

◆ mi_report_crashed

#define mi_report_crashed (   A,
 
)    _mi_report_crashed((A), (B), __FILE__, __LINE__)

◆ MI_SPLIT_LENGTH

#define MI_SPLIT_LENGTH   ((MI_EXTEND_BLOCK_LENGTH + 4) * 2)

◆ MI_STATE_EXTRA_SIZE

#define MI_STATE_EXTRA_SIZE
Value:
#define MI_MAX_KEY_SEG
Definition: myisam.h:63
#define MI_STATE_KEY_SIZE
Definition: myisamdef.h:116
#define MI_STATE_KEYSEG_SIZE
Definition: myisamdef.h:118
#define MI_MAX_KEY
Definition: myisam.h:54
#define MI_MAX_KEY_BLOCK_SIZE
Definition: myisamdef.h:484

◆ MI_STATE_INFO_SIZE

#define MI_STATE_INFO_SIZE   (24 + 14 * 8 + 7 * 4 + 2 * 2 + 8)

◆ MI_STATE_KEY_SIZE

#define MI_STATE_KEY_SIZE   8

◆ MI_STATE_KEYBLOCK_SIZE

#define MI_STATE_KEYBLOCK_SIZE   8

◆ MI_STATE_KEYSEG_SIZE

#define MI_STATE_KEYSEG_SIZE   4

◆ mi_test_if_nod

#define mi_test_if_nod (   x)    (x[0] & 128 ? info->s->base.key_reflength : 0)

◆ MI_UNIQUE_HASH_TYPE

#define MI_UNIQUE_HASH_TYPE   HA_KEYTYPE_ULONG_INT

◆ mi_unique_store

#define mi_unique_store (   A,
 
)    mi_int4store((A), (B))

◆ MI_UNIQUEDEF_SIZE

#define MI_UNIQUEDEF_SIZE   (2 + 1 + 1)

◆ MIN_SORT_BUFFER

#define MIN_SORT_BUFFER   (4096 - MALLOC_OVERHEAD)

◆ MY_HOW_OFTEN_TO_WRITE

#define MY_HOW_OFTEN_TO_WRITE   1000 /* How often we want info on screen */

◆ myisam_log

#define myisam_log (   a,
  b,
  c,
 
)    if (myisam_log_file >= 0) _myisam_log(a, b, c, d)

◆ myisam_log_command

#define myisam_log_command (   a,
  b,
  c,
  d,
 
)    if (myisam_log_file >= 0) _myisam_log_command(a, b, c, d, e)

◆ myisam_log_record

#define myisam_log_record (   a,
  b,
  c,
  d,
 
)    if (myisam_log_file >= 0) _myisam_log_record(a, b, c, d, e)

◆ NEED_MEM

#define NEED_MEM   ((uint)10 * 4 * (IO_SIZE + 32) + 32) /* Nead for recursion */

◆ PACK_TYPE_SELECTED

#define PACK_TYPE_SELECTED   1 /* Bits in field->pack_type */

◆ PACK_TYPE_SPACE_FIELDS

#define PACK_TYPE_SPACE_FIELDS   2

◆ PACK_TYPE_ZERO_FILL

#define PACK_TYPE_ZERO_FILL   4

◆ READ_BUFFER_INIT

#define READ_BUFFER_INIT   (1024L * 256L - MALLOC_OVERHEAD)

◆ READING_HEADER

#define READING_HEADER   2

◆ READING_NEXT

#define READING_NEXT   1

◆ REMEMBER_OLD_POS

#define REMEMBER_OLD_POS   64

◆ RRND_PRESERVE_LASTINX

#define RRND_PRESERVE_LASTINX   2

◆ SORT_BUFFER_INIT

#define SORT_BUFFER_INIT   (2048L * 1024L - MALLOC_OVERHEAD)

◆ STATE_CHANGED

#define STATE_CHANGED   1

◆ STATE_CRASHED

#define STATE_CRASHED   2

◆ STATE_CRASHED_ON_REPAIR

#define STATE_CRASHED_ON_REPAIR   4

◆ STATE_NOT_ANALYZED

#define STATE_NOT_ANALYZED   8

◆ STATE_NOT_OPTIMIZED_KEYS

#define STATE_NOT_OPTIMIZED_KEYS   16

◆ STATE_NOT_SORTED_PAGES

#define STATE_NOT_SORTED_PAGES   32

◆ store_key_length

#define store_key_length (   key,
  length 
)
Value:
{ \
if ((length) < 255) { \
*(key) = (length); \
} else { \
*(key) = 255; \
mi_int2store((key) + 1, (length)); \
} \
}
static const char * key
Definition: suite_stubs.c:14
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75

◆ UPDATE_AUTO_INC

#define UPDATE_AUTO_INC   8

◆ UPDATE_OPEN_COUNT

#define UPDATE_OPEN_COUNT   16

◆ UPDATE_SORT

#define UPDATE_SORT   4

◆ UPDATE_STAT

#define UPDATE_STAT   2

◆ UPDATE_TIME

#define UPDATE_TIME   1

◆ USE_BUFFER_INIT

#define USE_BUFFER_INIT   (((1024L * 512L - MALLOC_OVERHEAD) / IO_SIZE) * IO_SIZE)

◆ USE_PACKED_KEYS

#define USE_PACKED_KEYS   1

◆ USE_WHOLE_KEY

#define USE_WHOLE_KEY   MI_MAX_KEY_BUFF * 2 /* Use whole key in _mi_search() */

◆ WRITE_COUNT

#define WRITE_COUNT   MY_HOW_OFTEN_TO_WRITE

◆ WRITEINFO_NO_UNLOCK

#define WRITEINFO_NO_UNLOCK   2

◆ WRITEINFO_UPDATE_KEYFILE

#define WRITEINFO_UPDATE_KEYFILE   1

Typedef Documentation

◆ index_cond_func_t

typedef ICP_RESULT(* index_cond_func_t) (void *param)

◆ mi_bit_type

typedef uint mi_bit_type

Enumeration Type Documentation

◆ myisam_log_commands

Enumerator
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 

Function Documentation

◆ _create_index_by_sort()

int _create_index_by_sort ( MI_SORT_PARAM info,
bool  no_messages,
ulonglong   
)

◆ _mi_bin_search()

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 
)

◆ _mi_calc_bin_pack_key_length()

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 
)

◆ _mi_calc_static_key_length()

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 
)

◆ _mi_calc_var_key_length()

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 
)

◆ _mi_calc_var_pack_key_length()

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 
)

◆ _mi_check_index()

int _mi_check_index ( MI_INFO info,
int  inx 
)

◆ _mi_ck_delete()

int _mi_ck_delete ( MI_INFO info,
uint  keynr,
uchar key,
uint  key_length 
)

◆ _mi_ck_real_write_btree()

int _mi_ck_real_write_btree ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar key,
uint  key_length,
my_off_t root,
uint  comp_flag 
)

◆ _mi_ck_write()

int _mi_ck_write ( MI_INFO info,
uint  keynr,
uchar key,
uint  length 
)

◆ _mi_cmp_dynamic_record()

int _mi_cmp_dynamic_record ( MI_INFO info,
const uchar record 
)

◆ _mi_cmp_dynamic_unique()

int _mi_cmp_dynamic_unique ( MI_INFO info,
MI_UNIQUEDEF def,
const uchar record,
my_off_t  pos 
)

◆ _mi_cmp_static_record()

int _mi_cmp_static_record ( MI_INFO info,
const uchar record 
)

◆ _mi_cmp_static_unique()

int _mi_cmp_static_unique ( MI_INFO info,
MI_UNIQUEDEF def,
const uchar record,
my_off_t  pos 
)

◆ _mi_decrement_open_count()

int _mi_decrement_open_count ( MI_INFO info)

◆ _mi_delete_dynamic_record()

int _mi_delete_dynamic_record ( MI_INFO info)

◆ _mi_delete_static_record()

int _mi_delete_static_record ( MI_INFO info)

◆ _mi_dispose()

int _mi_dispose ( MI_INFO info,
MI_KEYDEF keyinfo,
my_off_t  pos,
int  level 
)

◆ _mi_dpointer()

void _mi_dpointer ( MI_INFO info,
uchar buff,
my_off_t  pos 
)

◆ _mi_dpos()

my_off_t _mi_dpos ( MI_INFO info,
uint  nod_flag,
const uchar after_key 
)

◆ _mi_enlarge_root()

int _mi_enlarge_root ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar key,
my_off_t root 
)

◆ _mi_fetch_keypage()

uchar* _mi_fetch_keypage ( MI_INFO info,
MI_KEYDEF keyinfo,
my_off_t  page,
int  level,
uchar buff,
int  return_buffer 
)

◆ _mi_find_half_pos()

uchar* _mi_find_half_pos ( uint  nod_flag,
MI_KEYDEF keyinfo,
uchar page,
uchar key,
uint return_key_length,
uchar **  after_key 
)

◆ _mi_ft_update()

int _mi_ft_update ( MI_INFO info,
uint  keynr,
uchar keybuf,
const uchar oldrec,
const uchar newrec,
my_off_t  pos 
)

◆ _mi_get_binary_pack_key()

uint _mi_get_binary_pack_key ( MI_KEYDEF keyinfo,
uint  nod_flag,
uchar **  page_pos,
uchar key 
)

◆ _mi_get_block_info()

uint _mi_get_block_info ( MI_BLOCK_INFO ,
File  ,
my_off_t   
)

◆ _mi_get_key()

uchar* _mi_get_key ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar page,
uchar key,
uchar keypos,
uint return_key_length 
)

◆ _mi_get_last_key()

uchar* _mi_get_last_key ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar keypos,
uchar lastkey,
uchar endpos,
uint return_key_length 
)

◆ _mi_get_pack_key()

uint _mi_get_pack_key ( MI_KEYDEF keyinfo,
uint  nod_flag,
uchar **  page,
uchar key 
)

◆ _mi_get_static_key()

uint _mi_get_static_key ( MI_KEYDEF keyinfo,
uint  nod_flag,
uchar **  page,
uchar key 
)

◆ _mi_insert()

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 
)

◆ _mi_keylength()

uint _mi_keylength ( MI_KEYDEF keyinfo,
const uchar key 
)

◆ _mi_keylength_part()

uint _mi_keylength_part ( MI_KEYDEF keyinfo,
const uchar key,
HA_KEYSEG end 
)

◆ _mi_kpointer()

void _mi_kpointer ( MI_INFO info,
uchar buff,
my_off_t  pos 
)

◆ _mi_kpos()

my_off_t _mi_kpos ( uint  nod_flag,
uchar after_key 
)

◆ _mi_make_key()

uint _mi_make_key ( MI_INFO info,
uint  keynr,
uchar key,
const uchar record,
my_off_t  filepos 
)

◆ _mi_mark_file_changed()

int _mi_mark_file_changed ( MI_INFO info)

◆ _mi_memmap_file()

bool _mi_memmap_file ( MI_INFO info)

◆ _mi_move_key()

uchar* _mi_move_key ( MI_KEYDEF keyinfo,
uchar to,
const uchar from 
)

◆ _mi_new()

my_off_t _mi_new ( MI_INFO info,
MI_KEYDEF keyinfo,
int  level 
)

◆ _mi_pack_get_block_info()

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 
)

◆ _mi_pack_key()

uint _mi_pack_key ( MI_INFO info,
uint  keynr,
uchar key,
const uchar old,
key_part_map  keypart_map,
HA_KEYSEG **  last_used_keyseg 
)

◆ _mi_pack_rec_unpack()

int _mi_pack_rec_unpack ( MI_INFO info,
MI_BIT_BUFF bit_buff,
uchar to,
uchar from,
ulong  reclength 
)

◆ _mi_prefix_search()

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 
)

◆ _mi_print_key()

void _mi_print_key ( FILE *  stream,
HA_KEYSEG keyseg,
const uchar key,
uint  length 
)

◆ _mi_read_cache()

int _mi_read_cache ( IO_CACHE info,
uchar buff,
my_off_t  pos,
uint  length,
int  re_read_if_possibly 
)

◆ _mi_read_dynamic_record()

int _mi_read_dynamic_record ( MI_INFO info,
my_off_t  filepos,
uchar buf 
)

◆ _mi_read_key_record()

int _mi_read_key_record ( MI_INFO info,
my_off_t  filepos,
uchar buf 
)

◆ _mi_read_pack_info()

bool _mi_read_pack_info ( MI_INFO info,
bool  fix_keys 
)

◆ _mi_read_pack_record()

int _mi_read_pack_record ( MI_INFO info,
my_off_t  filepos,
uchar buf 
)

◆ _mi_read_rnd_dynamic_record()

int _mi_read_rnd_dynamic_record ( MI_INFO ,
uchar ,
my_off_t  ,
bool   
)

◆ _mi_read_rnd_pack_record()

int _mi_read_rnd_pack_record ( MI_INFO ,
uchar ,
my_off_t  ,
bool   
)

◆ _mi_read_rnd_static_record()

int _mi_read_rnd_static_record ( MI_INFO ,
uchar ,
my_off_t  ,
bool   
)

◆ _mi_read_static_record()

int _mi_read_static_record ( MI_INFO info,
my_off_t  filepos,
uchar buf 
)

◆ _mi_readinfo()

int _mi_readinfo ( MI_INFO info,
int  lock_flag,
int  check_keybuffer 
)

◆ _mi_rec_check()

bool _mi_rec_check ( MI_INFO info,
const uchar record,
uchar packpos,
ulong  packed_length,
bool  with_checkum 
)

◆ _mi_rec_pack()

uint _mi_rec_pack ( MI_INFO info,
uchar to,
const uchar from 
)

◆ _mi_rec_pos()

my_off_t _mi_rec_pos ( MYISAM_SHARE info,
uchar ptr 
)

◆ _mi_rec_unpack()

ulong _mi_rec_unpack ( MI_INFO info,
uchar to,
const uchar from,
ulong  reclength 
)

◆ _mi_report_crashed()

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).

This function is intended to be used when table corruption is detected.

Parameters
[in]fileMI_INFO object.
[in]messageOptional error message.
[in]sfileName of source file.
[in]slineLine number in source file.

◆ _mi_search()

int _mi_search ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar key,
uint  key_len,
uint  nextflag,
my_off_t  pos 
)

◆ _mi_search_first()

int _mi_search_first ( MI_INFO info,
MI_KEYDEF keyinfo,
my_off_t  pos 
)

◆ _mi_search_last()

int _mi_search_last ( MI_INFO info,
MI_KEYDEF keyinfo,
my_off_t  pos 
)

◆ _mi_search_next()

int _mi_search_next ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar key,
uint  key_length,
uint  nextflag,
my_off_t  pos 
)

◆ _mi_seq_search()

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 
)

◆ _mi_split_page()

int _mi_split_page ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar key,
uchar buff,
uchar key_buff,
bool  insert_last 
)

◆ _mi_store_bin_pack_key()

void _mi_store_bin_pack_key ( MI_KEYDEF keyinfo,
uchar key_pos,
MI_KEY_PARAM s_temp 
)

◆ _mi_store_blob_length()

void _mi_store_blob_length ( uchar pos,
uint  pack_length,
uint  length 
)

◆ _mi_store_static_key()

void _mi_store_static_key ( MI_KEYDEF keyinfo,
uchar key_pos,
MI_KEY_PARAM s_temp 
)

◆ _mi_store_var_pack_key()

void _mi_store_var_pack_key ( MI_KEYDEF keyinfo,
uchar key_pos,
MI_KEY_PARAM s_temp 
)

◆ _mi_test_if_changed()

int _mi_test_if_changed ( MI_INFO info)

◆ _mi_unmap_file()

void _mi_unmap_file ( MI_INFO info)

◆ _mi_update_blob_record()

int _mi_update_blob_record ( MI_INFO ,
my_off_t  ,
const uchar  
)

◆ _mi_update_dynamic_record()

int _mi_update_dynamic_record ( MI_INFO ,
my_off_t  ,
const uchar  
)

◆ _mi_update_static_record()

int _mi_update_static_record ( MI_INFO ,
my_off_t  ,
const uchar  
)

◆ _mi_write_blob_record()

int _mi_write_blob_record ( MI_INFO ,
const uchar  
)

◆ _mi_write_dynamic_record()

int _mi_write_dynamic_record ( MI_INFO ,
const uchar  
)

◆ _mi_write_keypage()

int _mi_write_keypage ( MI_INFO info,
MI_KEYDEF keyinfo,
my_off_t  page,
int  level,
uchar buff 
)

◆ _mi_write_part_record()

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 
)

◆ _mi_write_static_record()

int _mi_write_static_record ( MI_INFO ,
const uchar  
)

◆ _mi_writeinfo()

int _mi_writeinfo ( MI_INFO info,
uint  options 
)

◆ _my_calc_total_blob_length()

ulong _my_calc_total_blob_length ( MI_INFO info,
const uchar record 
)

◆ _myisam_log()

void _myisam_log ( enum myisam_log_commands  command,
MI_INFO info,
const uchar buffert,
uint  length 
)

◆ _myisam_log_command()

void _myisam_log_command ( enum myisam_log_commands  command,
MI_INFO info,
const uchar buffert,
uint  length,
int  result 
)

◆ _myisam_log_record()

void _myisam_log_record ( enum myisam_log_commands  command,
MI_INFO info,
const uchar record,
my_off_t  filepos,
int  result 
)

◆ calc_pack_length()

uint calc_pack_length ( uint  version,
ulong  length 
)

◆ check_table_is_closed()

bool check_table_is_closed ( const char *  name,
const char *  where 
)

◆ flush_blocks()

int flush_blocks ( MI_CHECK param,
KEY_CACHE key_cache,
File  file 
)

◆ flush_pending_blocks()

int flush_pending_blocks ( MI_SORT_PARAM param)

◆ init_myisam_psi_keys()

void init_myisam_psi_keys ( )

◆ killed_ptr()

volatile int* killed_ptr ( MI_CHECK param)

◆ mi_alloc_rec_buff()

uchar* mi_alloc_rec_buff ( MI_INFO ,
ulong  ,
uchar **   
)

◆ mi_base_info_write()

uint mi_base_info_write ( File  file,
MI_BASE_INFO base 
)

◆ mi_check_index_cond()

int mi_check_index_cond ( MI_INFO info,
uint  keynr,
uchar record 
)

◆ mi_check_print_error()

void mi_check_print_error ( MI_CHECK param,
const char *  fmt,
  ... 
)

◆ mi_check_print_info()

void mi_check_print_info ( MI_CHECK param,
const char *  fmt,
  ... 
)

◆ mi_check_print_warning()

void mi_check_print_warning ( MI_CHECK param,
const char *  fmt,
  ... 
)

◆ mi_check_status()

bool mi_check_status ( void *  param)

◆ mi_check_unique()

bool mi_check_unique ( MI_INFO info,
MI_UNIQUEDEF def,
uchar record,
ha_checksum  unique_hash,
my_off_t  pos 
)

◆ mi_checksum()

ha_checksum mi_checksum ( MI_INFO info,
const uchar buf 
)

◆ mi_copy_status()

void mi_copy_status ( void *  to,
void *  from 
)

◆ mi_disable_indexes()

int mi_disable_indexes ( MI_INFO info)

◆ mi_dynmap_file()

bool mi_dynmap_file ( MI_INFO info,
my_off_t  size 
)

◆ mi_enable_indexes()

int mi_enable_indexes ( MI_INFO info)

◆ mi_get_status()

void mi_get_status ( void *  param,
int  concurrent_insert 
)

◆ mi_indexes_are_disabled()

int mi_indexes_are_disabled ( MI_INFO info)

◆ mi_keydef_read()

uchar* mi_keydef_read ( uchar ptr,
MI_KEYDEF keydef 
)

◆ mi_keydef_write()

uint mi_keydef_write ( File  file,
MI_KEYDEF keydef 
)

◆ mi_keyseg_read()

uchar* mi_keyseg_read ( uchar ptr,
HA_KEYSEG keyseg 
)

◆ mi_keyseg_write()

int mi_keyseg_write ( File  file,
const HA_KEYSEG keyseg 
)

◆ mi_mmap_pread()

size_t mi_mmap_pread ( MI_INFO info,
uchar Buffer,
size_t  Count,
my_off_t  offset,
myf  MyFlags 
)

◆ mi_mmap_pwrite()

size_t mi_mmap_pwrite ( MI_INFO info,
const uchar Buffer,
size_t  Count,
my_off_t  offset,
myf  MyFlags 
)

◆ mi_munmap_file()

int mi_munmap_file ( MI_INFO info)

◆ mi_nommap_pread()

size_t mi_nommap_pread ( MI_INFO info,
uchar Buffer,
size_t  Count,
my_off_t  offset,
myf  MyFlags 
)

◆ mi_nommap_pwrite()

size_t mi_nommap_pwrite ( MI_INFO info,
const uchar Buffer,
size_t  Count,
my_off_t  offset,
myf  MyFlags 
)

◆ mi_open_datafile()

int mi_open_datafile ( MI_INFO info,
MYISAM_SHARE share,
const char *  orn_name,
File  file_to_dup 
)

◆ mi_open_keyfile()

int mi_open_keyfile ( MYISAM_SHARE share)

◆ mi_recinfo_read()

uchar* mi_recinfo_read ( uchar ptr,
MI_COLUMNDEF recinfo 
)

◆ mi_recinfo_write()

uint mi_recinfo_write ( File  file,
MI_COLUMNDEF recinfo 
)

◆ mi_remap_file()

void mi_remap_file ( MI_INFO info,
my_off_t  size 
)

◆ mi_report_error()

void mi_report_error ( int  errcode,
const char *  file_name 
)

◆ mi_restore_status()

void mi_restore_status ( void *  param)

◆ mi_safe_mul()

ulonglong mi_safe_mul ( ulonglong  a,
ulonglong  b 
)

◆ mi_set_index_cond_func()

void mi_set_index_cond_func ( MI_INFO info,
index_cond_func_t  func,
void *  func_arg 
)

◆ mi_setup_functions()

void mi_setup_functions ( MYISAM_SHARE share)

◆ mi_state_info_read()

uchar* mi_state_info_read ( uchar ptr,
MI_STATE_INFO state 
)

◆ mi_state_info_read_dsk()

uint mi_state_info_read_dsk ( File  file,
MI_STATE_INFO state,
bool  pRead 
)

◆ mi_state_info_write()

uint mi_state_info_write ( File  file,
MI_STATE_INFO state,
uint  pWrite 
)

◆ mi_static_checksum()

ha_checksum mi_static_checksum ( MI_INFO info,
const uchar buf 
)

◆ mi_unique_comp()

int mi_unique_comp ( MI_UNIQUEDEF def,
const uchar a,
const uchar b,
bool  null_are_equal 
)

◆ mi_unique_hash()

ha_checksum mi_unique_hash ( MI_UNIQUEDEF def,
const uchar buf 
)

◆ mi_uniquedef_read()

uchar* mi_uniquedef_read ( uchar ptr,
MI_UNIQUEDEF keydef 
)

◆ mi_uniquedef_write()

uint mi_uniquedef_write ( File  file,
MI_UNIQUEDEF keydef 
)

◆ mi_update_status()

void mi_update_status ( void *  param)

◆ my_n_base_info_read()

uchar* my_n_base_info_read ( uchar ptr,
MI_BASE_INFO base 
)

◆ read_pack_length()

uint read_pack_length ( uint  version,
const uchar buf,
ulong length 
)

◆ retrieve_auto_increment()

ulonglong retrieve_auto_increment ( MI_INFO info,
const uchar record 
)

◆ save_pack_length()

uint save_pack_length ( uint  version,
uchar block_buff,
ulong  length 
)

◆ sort_ft_buf_flush()

int sort_ft_buf_flush ( MI_SORT_PARAM sort_param)

◆ sort_write_record()

int sort_write_record ( MI_SORT_PARAM sort_param)

◆ test_if_reopen()

MI_INFO* test_if_reopen ( char *  filename)

◆ thr_find_all_keys()

void* thr_find_all_keys ( void *  arg)

◆ thr_write_keys()

int thr_write_keys ( MI_SORT_PARAM sort_param)

Variable Documentation

◆ key_memory_QUEUE

PSI_memory_key key_memory_QUEUE

◆ keycache_tls

thread_local st_keycache_thread_var* keycache_tls

◆ mi_key_cond_MI_SORT_INFO_cond

PSI_cond_key mi_key_cond_MI_SORT_INFO_cond

◆ mi_key_file_datatmp

PSI_file_key mi_key_file_datatmp

◆ mi_key_file_dfile

PSI_file_key mi_key_file_dfile

◆ mi_key_file_kfile

PSI_file_key mi_key_file_kfile

◆ mi_key_file_log

PSI_file_key mi_key_file_log

◆ mi_key_memory_filecopy

PSI_memory_key mi_key_memory_filecopy

◆ mi_key_memory_FT_INFO

PSI_memory_key mi_key_memory_FT_INFO

◆ mi_key_memory_ft_memroot

PSI_memory_key mi_key_memory_ft_memroot

◆ mi_key_memory_ft_stopwords

PSI_memory_key mi_key_memory_ft_stopwords

◆ mi_key_memory_FTB

PSI_memory_key mi_key_memory_FTB

◆ mi_key_memory_FTPARSER_PARAM

PSI_memory_key mi_key_memory_FTPARSER_PARAM

◆ mi_key_memory_keycache_thread_var

PSI_memory_key mi_key_memory_keycache_thread_var

◆ mi_key_memory_MI_DECODE_TREE

PSI_memory_key mi_key_memory_MI_DECODE_TREE

◆ mi_key_memory_MI_INFO

PSI_memory_key mi_key_memory_MI_INFO

◆ mi_key_memory_MI_INFO_bulk_insert

PSI_memory_key mi_key_memory_MI_INFO_bulk_insert

◆ mi_key_memory_MI_INFO_ft1_to_ft2

PSI_memory_key mi_key_memory_MI_INFO_ft1_to_ft2

◆ mi_key_memory_MI_SORT_PARAM

PSI_memory_key mi_key_memory_MI_SORT_PARAM

◆ mi_key_memory_MI_SORT_PARAM_wordroot

PSI_memory_key mi_key_memory_MI_SORT_PARAM_wordroot

◆ mi_key_memory_MYISAM_SHARE

PSI_memory_key mi_key_memory_MYISAM_SHARE

◆ mi_key_memory_MYISAM_SHARE_decode_tables

PSI_memory_key mi_key_memory_MYISAM_SHARE_decode_tables

◆ mi_key_memory_preload_buffer

PSI_memory_key mi_key_memory_preload_buffer

◆ mi_key_memory_record_buffer

PSI_memory_key mi_key_memory_record_buffer

◆ mi_key_memory_SORT_FT_BUF

PSI_memory_key mi_key_memory_SORT_FT_BUF

◆ mi_key_memory_SORT_INFO_buffer

PSI_memory_key mi_key_memory_SORT_INFO_buffer

◆ mi_key_memory_SORT_KEY_BLOCKS

PSI_memory_key mi_key_memory_SORT_KEY_BLOCKS

◆ mi_key_memory_stPageList_pages

PSI_memory_key mi_key_memory_stPageList_pages

◆ mi_key_mutex_MI_CHECK_print_msg

PSI_mutex_key mi_key_mutex_MI_CHECK_print_msg

◆ mi_key_mutex_MI_SORT_INFO_mutex

PSI_mutex_key mi_key_mutex_MI_SORT_INFO_mutex

◆ mi_key_mutex_MYISAM_SHARE_intern_lock

PSI_mutex_key mi_key_mutex_MYISAM_SHARE_intern_lock

◆ mi_key_rwlock_MYISAM_SHARE_key_root_lock

PSI_rwlock_key mi_key_rwlock_MYISAM_SHARE_key_root_lock

◆ mi_key_rwlock_MYISAM_SHARE_mmap_lock

PSI_rwlock_key mi_key_rwlock_MYISAM_SHARE_mmap_lock

◆ mi_key_thread_find_all_keys

PSI_thread_key mi_key_thread_find_all_keys

◆ mi_keycache_thread_var_suspend

PSI_cond_key mi_keycache_thread_var_suspend

◆ myisam_file_magic

uchar myisam_file_magic[]

◆ myisam_log_file

File myisam_log_file

◆ myisam_open_list

LIST* myisam_open_list

◆ myisam_pack_file_magic

uchar myisam_pack_file_magic[]

◆ myisam_pid

ulong myisam_pid

◆ myisam_quick_table_bits

uint myisam_quick_table_bits

◆ myisam_read_vec

uint myisam_read_vec[]

◆ myisam_readnext_vec

uint myisam_readnext_vec[]

◆ THR_LOCK_myisam

mysql_mutex_t THR_LOCK_myisam