MySQL 8.4.2
Source Code Documentation
|
#include "storage/myisam/ha_myisam.h"
#include <fcntl.h>
#include <limits.h>
#include <stdarg.h>
#include <algorithm>
#include <bit>
#include <new>
#include "lex_string.h"
#include "m_string.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_io.h"
#include "my_psi_config.h"
#include "myisam.h"
#include "myisampack.h"
#include "mysql/plugin.h"
#include "mysql/strings/int2str.h"
#include "mysql/strings/m_ctype.h"
#include "nulls.h"
#include "sql/current_thd.h"
#include "sql/derror.h"
#include "sql/field.h"
#include "sql/key.h"
#include "sql/log.h"
#include "sql/mysqld.h"
#include "sql/protocol.h"
#include "sql/sql_class.h"
#include "sql/sql_lex.h"
#include "sql/sql_plugin.h"
#include "sql/sql_table.h"
#include "sql/system_variables.h"
#include "storage/myisam/myisamdef.h"
#include "storage/myisam/rt_index.h"
#include "strxmov.h"
#include "mysql/components/services/log_builtins.h"
Macros | |
#define | MYSQL_SERVER 1 |
#define | MB (1024 * 1024) |
Functions | |
static bool | myisam_is_supported_system_table (const char *db, const char *table_name, bool is_sql_layer_system_table) |
Check if the given db.tablename is a system table for this SE. More... | |
static | MYSQL_SYSVAR_ULONG (block_size, opt_myisam_block_size, PLUGIN_VAR_NOSYSVAR|PLUGIN_VAR_RQCMDARG, "Block size to be used for MyISAM index pages", nullptr, nullptr, MI_KEY_BLOCK_LENGTH, MI_MIN_KEY_BLOCK_LENGTH, MI_MAX_KEY_BLOCK_LENGTH, MI_MIN_KEY_BLOCK_LENGTH) |
static | MYSQL_SYSVAR_ULONG (data_pointer_size, myisam_data_pointer_size, PLUGIN_VAR_RQCMDARG, "Default pointer size to be used for MyISAM tables", nullptr, nullptr, 6, 2, 7, 1) |
static | MYSQL_SYSVAR_ULONGLONG (max_sort_file_size, myisam_max_temp_length, PLUGIN_VAR_RQCMDARG, "Don't use the fast sort index method to created " "index if the temporary file would get bigger than this", nullptr, nullptr, LONG_MAX/MB *MB, 0, MAX_FILE_SIZE, MB) |
static | MYSQL_SYSVAR_SET (recover_options, myisam_recover_options, PLUGIN_VAR_OPCMDARG|PLUGIN_VAR_READONLY, "Syntax: myisam-recover-options[=option[,option...]], where option can be " "DEFAULT, BACKUP, FORCE, QUICK, or OFF", nullptr, nullptr, 0, &myisam_recover_typelib) |
static | MYSQL_THDVAR_ULONGLONG (sort_buffer_size, PLUGIN_VAR_RQCMDARG, "The buffer that is allocated when sorting the index when doing " "a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE", nullptr, nullptr, 8192 *1024,(long)(MIN_SORT_BUFFER+MALLOC_OVERHEAD), SIZE_T_MAX, 1) |
static | MYSQL_SYSVAR_BOOL (use_mmap, opt_myisam_use_mmap, PLUGIN_VAR_NOCMDARG, "Use memory mapping for reading and writing MyISAM tables", nullptr, nullptr, false) |
static | MYSQL_SYSVAR_ULONGLONG (mmap_size, myisam_mmap_size, PLUGIN_VAR_RQCMDARG|PLUGIN_VAR_READONLY, "Restricts the total memory " "used for memory mapping of MySQL tables", nullptr, nullptr, SIZE_T_MAX, MEMMAP_EXTRA_MARGIN, SIZE_T_MAX, 1) |
static | MYSQL_THDVAR_ENUM (stats_method, PLUGIN_VAR_RQCMDARG, "Specifies how MyISAM index statistics collection code should " "treat NULLs. Possible values of name are NULLS_UNEQUAL (default " "behavior for 4.1 and later), NULLS_EQUAL (emulate 4.0 behavior), " "and NULLS_IGNORED", nullptr, nullptr, MI_STATS_METHOD_NULLS_NOT_EQUAL, &myisam_stats_method_typelib) |
static void | debug_wait_for_kill (const char *info) |
Causes the thread to wait in a spin lock for a query kill signal. More... | |
static handler * | myisam_create_handler (handlerton *hton, TABLE_SHARE *table, bool, MEM_ROOT *mem_root) |
static void | mi_check_print_msg (MI_CHECK *param, const char *msg_type, const char *fmt, va_list args) |
int | table2myisam (TABLE *table_arg, MI_KEYDEF **keydef_out, MI_COLUMNDEF **recinfo_out, uint *records_out) |
int | check_definition (MI_KEYDEF *t1_keyinfo, MI_COLUMNDEF *t1_recinfo, uint t1_keys, uint t1_recs, MI_KEYDEF *t2_keyinfo, MI_COLUMNDEF *t2_recinfo, uint t2_keys, uint t2_recs, bool strict) |
volatile int * | killed_ptr (MI_CHECK *param) |
void | mi_check_print_error (MI_CHECK *param, const char *fmt,...) |
void | mi_check_print_info (MI_CHECK *param, const char *fmt,...) |
void | mi_check_print_warning (MI_CHECK *param, const char *fmt,...) |
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... | |
ICP_RESULT | index_cond_func_myisam (void *arg) |
static int | myisam_panic (handlerton *, ha_panic_function flag) |
st_keycache_thread_var * | keycache_thread_var () |
static int | myisam_close_connection (handlerton *hton, THD *thd) |
static int | myisam_init (void *p) |
static int | myisam_deinit (void *) |
mysql_declare_plugin (myisam) | |
Variables | |
ulonglong | myisam_recover_options |
static ulong | opt_myisam_block_size |
const char * | myisam_recover_names [] |
TYPELIB | myisam_recover_typelib |
const char * | myisam_stats_method_names [] |
TYPELIB | myisam_stats_method_typelib |
static const char * | ha_myisam_exts [] = {".MYI", ".MYD", NullS} |
static SYS_VAR * | myisam_sysvars [] |
struct st_mysql_storage_engine | myisam_storage_engine |
mysql_declare_plugin_end | |
#define MB (1024 * 1024) |
#define MYSQL_SERVER 1 |
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.
[in] | file | MI_INFO object. |
[in] | message | Optional error message. |
[in] | sfile | Name of source file. |
[in] | sline | Line number in source file. |
int check_definition | ( | MI_KEYDEF * | t1_keyinfo, |
MI_COLUMNDEF * | t1_recinfo, | ||
uint | t1_keys, | ||
uint | t1_recs, | ||
MI_KEYDEF * | t2_keyinfo, | ||
MI_COLUMNDEF * | t2_recinfo, | ||
uint | t2_keys, | ||
uint | t2_recs, | ||
bool | strict | ||
) |
|
static |
Causes the thread to wait in a spin lock for a query kill signal.
This function is used by the test frame work to identify race conditions.
The signal is caught and ignored and the thread is not killed.
ICP_RESULT index_cond_func_myisam | ( | void * | arg | ) |
st_keycache_thread_var * keycache_thread_var | ( | ) |
volatile int * killed_ptr | ( | MI_CHECK * | param | ) |
void mi_check_print_error | ( | MI_CHECK * | param, |
const char * | fmt, | ||
... | |||
) |
void mi_check_print_info | ( | MI_CHECK * | param, |
const char * | fmt, | ||
... | |||
) |
|
static |
void mi_check_print_warning | ( | MI_CHECK * | param, |
const char * | fmt, | ||
... | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
Check if the given db.tablename is a system table for this SE.
db | database name. |
table_name | table name to check. |
is_sql_layer_system_table | if the supplied db.table_name is a SQL layer system table. |
true | Given db.table_name is supported system table. |
false | Given db.table_name is not a supported system table. |
|
static |
mysql_declare_plugin | ( | myisam | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int table2myisam | ( | TABLE * | table_arg, |
MI_KEYDEF ** | keydef_out, | ||
MI_COLUMNDEF ** | recinfo_out, | ||
uint * | records_out | ||
) |
|
static |
const char* myisam_recover_names[] |
ulonglong myisam_recover_options |
TYPELIB myisam_recover_typelib |
const char* myisam_stats_method_names[] |
TYPELIB myisam_stats_method_typelib |
struct st_mysql_storage_engine myisam_storage_engine |
|
static |
mysql_declare_plugin_end |
|
static |