MySQL 8.0.40
Source Code Documentation
mysqlcheck.cc File Reference
#include "client/check/mysqlcheck.h"
#include <mysql_version.h>
#include <mysqld_error.h>
#include <stdlib.h>
#include "caching_sha2_passwordopt-vars.h"
#include "client/client_priv.h"
#include "compression.h"
#include "m_ctype.h"
#include "my_alloc.h"
#include "my_dbug.h"
#include "my_default.h"
#include "my_inttypes.h"
#include "my_macros.h"
#include "mysql/service_mysql_alloc.h"
#include "print_version.h"
#include "sslopt-vars.h"
#include "typelib.h"
#include "welcome_copyright_notice.h"
#include "multi_factor_passwordopt-vars.h"
#include "multi_factor_passwordopt-longopts.h"
#include "caching_sha2_passwordopt-longopts.h"
#include "sslopt-longopts.h"
#include "sslopt-case.h"

Macros

#define EX_USAGE   1
 
#define EX_MYSQLERR   2
 

Functions

static void usage (void)
 
static int get_options (int *argc, char ***argv, MEM_ROOT *alloc)
 
static int dbConnect (char *host, char *user)
 
static void dbDisconnect (char *host)
 
static void DBerror (MYSQL *mysql, const string &when)
 
static void safe_exit (int error)
 
static bool get_one_option (int optid, const struct my_option *opt, char *argument)
 
int main (int argc, char **argv)
 

Variables

static MYSQL mysql_connection
 
static MYSQLsock = nullptr
 
static bool opt_alldbs = false
 
static bool opt_check_only_changed = false
 
static bool opt_extended = false
 
static bool opt_compress = false
 
static bool opt_databases = false
 
static bool opt_fast = false
 
static bool opt_medium_check = false
 
static bool opt_quick = false
 
static bool opt_all_in_1 = false
 
static bool opt_silent = false
 
static bool opt_auto_repair = false
 
static bool ignore_errors = false
 
static bool opt_frm = false
 
static bool debug_info_flag = false
 
static bool debug_check_flag = false
 
static bool opt_fix_table_names = false
 
static bool opt_fix_db_names = false
 
static bool opt_upgrade = false
 
static bool opt_write_binlog = true
 
static uint verbose = 0
 
static uint opt_mysql_port = 0
 
static uint opt_enable_cleartext_plugin = 0
 
static bool using_opt_enable_cleartext_plugin = false
 
static int my_end_arg
 
static char * opt_mysql_unix_port = nullptr
 
static char * current_user = nullptr
 
static char * current_host = nullptr
 
static const char * default_charset = nullptr
 
static char * opt_plugin_dir = nullptr
 
static char * opt_default_auth = nullptr
 
static int first_error = 0
 
static const char * opt_skip_database = ""
 
static uint opt_zstd_compress_level = default_zstd_compression_level
 
static char * opt_compress_algorithm = nullptr
 
static uint opt_protocol = 0
 
static char * opt_bind_addr = nullptr
 
static struct my_option my_long_options []
 
static const char * load_default_groups [] = {"mysqlcheck", "client", nullptr}
 
static int what_to_do = 0
 

Macro Definition Documentation

◆ EX_MYSQLERR

#define EX_MYSQLERR   2

◆ EX_USAGE

#define EX_USAGE   1

Function Documentation

◆ dbConnect()

static int dbConnect ( char *  host,
char *  user 
)
static

◆ dbDisconnect()

static void dbDisconnect ( char *  host)
static

◆ DBerror()

static void DBerror ( MYSQL mysql,
const string &  when 
)
static

◆ get_one_option()

static bool get_one_option ( int  optid,
const struct my_option opt,
char *  argument 
)
static

◆ get_options()

static int get_options ( int *  argc,
char ***  argv,
MEM_ROOT alloc 
)
static

◆ main()

int main ( int  argc,
char **  argv 
)

◆ safe_exit()

static void safe_exit ( int  error)
static

◆ usage()

static void usage ( void  )
static

Variable Documentation

◆ current_host

char * current_host = nullptr
static

◆ current_user

char* current_user = nullptr
static

◆ debug_check_flag

bool debug_check_flag = false
static

◆ debug_info_flag

bool debug_info_flag = false
static

◆ default_charset

const char* default_charset = nullptr
static

◆ first_error

int first_error = 0
static

◆ ignore_errors

bool ignore_errors = false
static

◆ load_default_groups

const char* load_default_groups[] = {"mysqlcheck", "client", nullptr}
static

◆ my_end_arg

int my_end_arg
static

◆ my_long_options

struct my_option my_long_options[]
static

◆ mysql_connection

MYSQL mysql_connection
static

◆ opt_all_in_1

bool opt_all_in_1 = false
static

◆ opt_alldbs

bool opt_alldbs = false
static

◆ opt_auto_repair

bool opt_auto_repair = false
static

◆ opt_bind_addr

char* opt_bind_addr = nullptr
static

◆ opt_check_only_changed

bool opt_check_only_changed = false
static

◆ opt_compress

bool opt_compress = false
static

◆ opt_compress_algorithm

char* opt_compress_algorithm = nullptr
static

◆ opt_databases

bool opt_databases = false
static

◆ opt_default_auth

char * opt_default_auth = nullptr
static

◆ opt_enable_cleartext_plugin

uint opt_enable_cleartext_plugin = 0
static

◆ opt_extended

bool opt_extended = false
static

◆ opt_fast

bool opt_fast = false
static

◆ opt_fix_db_names

bool opt_fix_db_names = false
static

◆ opt_fix_table_names

bool opt_fix_table_names = false
static

◆ opt_frm

bool opt_frm = false
static

◆ opt_medium_check

bool opt_medium_check = false
static

◆ opt_mysql_port

uint opt_mysql_port = 0
static

◆ opt_mysql_unix_port

char* opt_mysql_unix_port = nullptr
static

◆ opt_plugin_dir

char* opt_plugin_dir = nullptr
static

◆ opt_protocol

uint opt_protocol = 0
static

◆ opt_quick

bool opt_quick = false
static

◆ opt_silent

bool opt_silent = false
static

◆ opt_skip_database

const char* opt_skip_database = ""
static

◆ opt_upgrade

bool opt_upgrade = false
static

◆ opt_write_binlog

bool opt_write_binlog = true
static

◆ opt_zstd_compress_level

uint opt_zstd_compress_level = default_zstd_compression_level
static

◆ sock

MYSQL * sock = nullptr
static

◆ using_opt_enable_cleartext_plugin

bool using_opt_enable_cleartext_plugin = false
static

◆ verbose

uint verbose = 0
static

◆ what_to_do

int what_to_do = 0
static