MySQL 8.0.39
Source Code Documentation
|
This class is object wrapper to mysql_check function. More...
#include <mysqlcheck.h>
Public Member Functions | |
Program () | |
Default constructor. More... | |
int | check_databases (MYSQL *connection, const std::vector< std::string > &databases) |
Checks specified databases on MySQL server. More... | |
int | check_all_databases (MYSQL *connection) |
Checks all databases on MySQL server. More... | |
Program * | enable_auto_repair (bool enable) |
Automatically try to fix table when upgrade is needed. More... | |
Program * | enable_upgrade (bool enable) |
Check and upgrade tables. More... | |
Program * | enable_verbosity (bool enable) |
Turns on verbose messages. More... | |
Program * | enable_writing_binlog (bool enable) |
Enables logging repairing queries to binlog. More... | |
Program * | enable_fixing_table_names (bool enable) |
Enables table name fixing for all encountered tables. More... | |
Program * | enable_fixing_db_names (bool enable) |
Enables database name fixing for all encountered databases. More... | |
Program * | set_ignore_errors (bool ignore) |
Ignores all errors and don't print error messages. More... | |
Program * | set_skip_database (std::string database) |
Sets a name of database to ignore during process. More... | |
Program * | set_error_callback (void(*error_callback)(MYSQL *mysql, const std::string &when)) |
Sets error callback to be called when error is encountered. More... | |
Private Member Functions | |
Program * | set_what_to_do (int functionality) |
Sets mysqlcheck program operation type to perform. More... | |
int | execute (const std::vector< std::string > &positional_options) |
Starts mysqlcheck process. More... | |
Private Attributes | |
int | m_what_to_do |
bool | m_auto_repair |
bool | m_upgrade |
bool | m_verbose |
bool | m_ignore_errors |
bool | m_write_binlog |
bool | m_process_all_dbs |
bool | m_fix_table_names |
bool | m_fix_db_names |
MYSQL * | m_connection |
std::string | m_database_to_skip |
void(* | m_error_callback )(MYSQL *mysql, const std::string &when) |
Related Functions | |
(Note that these are not member functions.) | |
int | execute (const vector< string > &positional_options) |
This class is object wrapper to mysql_check function.
It looks like it is implementing Abstract_program, but it is not explicitly implementing it now. This is to make future implementation of Abstract_program easier.
Program::Program | ( | ) |
Default constructor.
int Program::check_all_databases | ( | MYSQL * | connection | ) |
Checks all databases on MySQL server.
int Program::check_databases | ( | MYSQL * | connection, |
const std::vector< std::string > & | databases | ||
) |
Checks specified databases on MySQL server.
Program * Program::enable_auto_repair | ( | bool | enable | ) |
Automatically try to fix table when upgrade is needed.
Program * Program::enable_fixing_db_names | ( | bool | enable | ) |
Enables database name fixing for all encountered databases.
Program * Program::enable_fixing_table_names | ( | bool | enable | ) |
Enables table name fixing for all encountered tables.
Program * Program::enable_upgrade | ( | bool | enable | ) |
Check and upgrade tables.
Program * Program::enable_verbosity | ( | bool | enable | ) |
Turns on verbose messages.
Program * Program::enable_writing_binlog | ( | bool | enable | ) |
Enables logging repairing queries to binlog.
|
private |
Starts mysqlcheck process.
Program * Program::set_error_callback | ( | void(*)(MYSQL *mysql, const std::string &when) | error_callback | ) |
Sets error callback to be called when error is encountered.
Program * Program::set_ignore_errors | ( | bool | ignore | ) |
Ignores all errors and don't print error messages.
Program * Program::set_skip_database | ( | std::string | database | ) |
Sets a name of database to ignore during process.
|
private |
Sets mysqlcheck program operation type to perform.
|
related |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |