MySQL 8.0.40
Source Code Documentation
|
Go to the source code of this file.
Classes | |
struct | Service_status_msg |
Service status message providing an abstraction for the service message sent by monitor to client. More... | |
Enumerations | |
enum class | Signal_type { SIGNAL_SHUTDOWN , SIGNAL_SERVICE_STATUS_CMD , SIGNAL_SERVICE_STATUS_CMD_PROCESSED } |
Type indicating the type of signals which involve communication between the monitor and the mysqld. More... | |
enum class | Monitor_log_msg_type { MONITOR_LOG_ERROR , MONITOR_LOG_WARN , MONITOR_LOG_INFO } |
Type of messages logged by monitor logging. More... | |
Functions | |
bool | initialize_mysqld_monitor () |
Initialize the mysqld monitor. More... | |
void | deinitialize_mysqld_monitor () |
Deinitialize the monitor. More... | |
bool | send_service_status (const Service_status_msg &) |
Send service status message to the monitor. More... | |
void | close_service_status_pipe_in_mysqld () |
Close the service status pipe. More... | |
const char * | get_monitor_pid () |
Get char representation corresponding to MYSQLD_PARENT_PID. More... | |
void | signal_event (Signal_type signal) |
Signal an event of type Signal_type. More... | |
bool | is_early_option (int argc, char **argv) |
Check if option is an early type or –gdb, –no-monitor. More... | |
bool | is_mysqld_monitor () |
Check if we are monitor process. More... | |
bool | is_monitor_win_service () |
Check if the monitor is started under a windows service. More... | |
int | start_monitor () |
Start the monitor if we are called in parent (monitor) context. More... | |
bool | setup_service_status_cmd_processed_handle () |
Setup the service status command processed handle. More... | |
void | close_service_status_cmd_processed_handle () |
Close the Service Status Cmd Processed handle. More... | |
bool | is_windows_service () |
NTService * | get_win_service_ptr () |
|
strong |
|
strong |
Type indicating the type of signals which involve communication between the monitor and the mysqld.
void close_service_status_cmd_processed_handle | ( | ) |
Close the Service Status Cmd Processed handle.
void close_service_status_pipe_in_mysqld | ( | ) |
Close the service status pipe.
This method is called by the mysqld child process.
Close the service status pipe.
This call shall made in context of the mysqld process.
void deinitialize_mysqld_monitor | ( | ) |
Deinitialize the monitor.
This method essentially closes any handles opened during initialization.
const char * get_monitor_pid | ( | ) |
Get char representation corresponding to MYSQLD_PARENT_PID.
NTService * get_win_service_ptr | ( | ) |
bool initialize_mysqld_monitor | ( | ) |
Initialize the mysqld monitor.
This method is called from both the monitor and mysqld. It sets the variable that distinguishes the monitor and the mysqld. It also initialize the monitor logging subsystem if the process under which it is called is monitor.
bool is_early_option | ( | int | argc, |
char ** | argv | ||
) |
Check if option is an early type or –gdb, –no-monitor.
The early type options are verbose, help, initialize, version and initialize-insecure. These options print and do certain activities and allow the server to exit. In addition there are options like gdb, no-monitor where we do not spawn a monitor process.
argc | Count of arguments. |
argv | Vector of arguments. |
bool is_monitor_win_service | ( | ) |
Check if the monitor is started under a windows service.
bool is_mysqld_monitor | ( | ) |
Check if we are monitor process.
bool is_windows_service | ( | ) |
bool send_service_status | ( | const Service_status_msg & | msg | ) |
Send service status message to the monitor.
This method is used by mysqld to send service status like running and setting the slow timeout value.
bool setup_service_status_cmd_processed_handle | ( | ) |
Setup the service status command processed handle.
This method is called from mysqld context. This handle ensures the synchronization required between the monitor and mysqld once the monitor has handled the service status sent by client.
Setup the service status command processed handle.
void signal_event | ( | Signal_type | signal | ) |
Signal an event of type Signal_type.
signal | type of the event. |
int start_monitor | ( | ) |
Start the monitor if we are called in parent (monitor) context.
In child context, set the event names and get the monitor process pid and return -1.