MySQL 8.0.37
Source Code Documentation
s_mysql_clone_protocol Struct Reference

#include <clone_protocol_service.h>

Public Attributes

void(* mysql_clone_start_statement )(THD *&thd, unsigned int thread_key, unsigned int statement_key)
 Start and set session and statement key form current thread. More...
 
void(* mysql_clone_finish_statement )(THD *thd)
 Finish statement and session. More...
 
int(* mysql_clone_get_charsets )(THD *thd, Mysql_Clone_Values &char_sets)
 Get all character set and collations. More...
 
int(* mysql_clone_validate_charsets )(THD *thd, Mysql_Clone_Values &char_sets)
 Check if all characters sets are supported by server. More...
 
int(* mysql_clone_get_configs )(THD *thd, Mysql_Clone_Key_Values &configs)
 Get system configuration parameter values. More...
 
int(* mysql_clone_validate_configs )(THD *thd, Mysql_Clone_Key_Values &configs)
 Check if configuration parameter values match. More...
 
MYSQL *(* mysql_clone_connect )(THD *thd, const char *host, uint32_t port, const char *user, const char *passwd, mysql_clone_ssl_context *ssl_ctx, MYSQL_SOCKET *socket)
 Connect to a remote server and switch to clone protocol. More...
 
int(* mysql_clone_send_command )(THD *thd, MYSQL *connection, bool set_active, unsigned char command, unsigned char *com_buffer, size_t buffer_length)
 Execute clone command on remote server. More...
 
int(* mysql_clone_get_response )(THD *thd, MYSQL *connection, bool set_active, uint32_t timeout, unsigned char **packet, size_t *length, size_t *net_length)
 Get response from remote server. More...
 
int(* mysql_clone_kill )(MYSQL *connection, MYSQL *kill_connection)
 Kill a remote connection. More...
 
void(* mysql_clone_disconnect )(THD *thd, MYSQL *connection, bool is_fatal, bool clear_error)
 Disconnect from a remote server. More...
 
void(* mysql_clone_get_error )(THD *thd, uint32_t *err_num, const char **err_mesg)
 Get error number and message. More...
 
int(* mysql_clone_get_command )(THD *thd, unsigned char *command, unsigned char **com_buffer, size_t *buffer_length)
 Get command from client. More...
 
int(* mysql_clone_send_response )(THD *thd, bool secure, unsigned char *packet, size_t length)
 Send response to client. More...
 
int(* mysql_clone_send_error )(THD *thd, unsigned char err_cmd, bool is_fatal)
 Send error to client. More...
 

Member Data Documentation

◆ mysql_clone_connect

MYSQL *(* s_mysql_clone_protocol::mysql_clone_connect) (THD *thd, const char *host, uint32_t port, const char *user, const char *passwd, mysql_clone_ssl_context *ssl_ctx, MYSQL_SOCKET *socket)

Connect to a remote server and switch to clone protocol.

Parameters
[in,out]thdserver session THD
[in]hosthost name to connect to
[in]portport number to connect to
[in]useruser name on remote host
[in]passwdpassword for the user
[in]ssl_ctxclient ssl context
[out]socketNetwork socket for the connection
Returns
Connection object if successful.

◆ mysql_clone_disconnect

void(* s_mysql_clone_protocol::mysql_clone_disconnect) (THD *thd, MYSQL *connection, bool is_fatal, bool clear_error)

Disconnect from a remote server.

Parameters
[in,out]thdlocal session THD
[in,out]connectionconnection object
[in]is_fatalif closing after fatal error
[in]clear_errorclear any earlier error in session

◆ mysql_clone_finish_statement

void(* s_mysql_clone_protocol::mysql_clone_finish_statement) (THD *thd)

Finish statement and session.

Parameters
[in,out]thdserver session THD

◆ mysql_clone_get_charsets

int(* s_mysql_clone_protocol::mysql_clone_get_charsets) (THD *thd, Mysql_Clone_Values &char_sets)

Get all character set and collations.

Parameters
[in,out]thdserver session THD
[out]char_setsall character set collations
Returns
error code.

◆ mysql_clone_get_command

int(* s_mysql_clone_protocol::mysql_clone_get_command) (THD *thd, unsigned char *command, unsigned char **com_buffer, size_t *buffer_length)

Get command from client.

Parameters
[in,out]thdserver session THD
[out]commandremote command
[out]com_bufferdata following command
[out]buffer_lengthdata length
Returns
error code.

◆ mysql_clone_get_configs

int(* s_mysql_clone_protocol::mysql_clone_get_configs) (THD *thd, Mysql_Clone_Key_Values &configs)

Get system configuration parameter values.

Parameters
[in,out]thdserver session THD
[in,out]configsa list of configuration key value pair keys are input and values are output
Returns
error code.

◆ mysql_clone_get_error

void(* s_mysql_clone_protocol::mysql_clone_get_error) (THD *thd, uint32_t *err_num, const char **err_mesg)

Get error number and message.

Parameters
[in,out]thdlocal session THD
[out]err_numerror number
[out]err_mesgerror message text

◆ mysql_clone_get_response

int(* s_mysql_clone_protocol::mysql_clone_get_response) (THD *thd, MYSQL *connection, bool set_active, uint32_t timeout, unsigned char **packet, size_t *length, size_t *net_length)

Get response from remote server.

Parameters
[in,out]thdlocal session THD
[in,out]connectionconnection object
[in]set_activeset socket active for current THD
[in]timeouttimeout in seconds
[out]packetresponse packet
[out]lengthpacket length
[out]net_lengthnetwork data length for compressed data
Returns
error code.

◆ mysql_clone_kill

int(* s_mysql_clone_protocol::mysql_clone_kill) (MYSQL *connection, MYSQL *kill_connection)

Kill a remote connection.

Parameters
[in,out]connectionconnection object
[in]kill_connectionconnection to kill
Returns
error code.

◆ mysql_clone_send_command

int(* s_mysql_clone_protocol::mysql_clone_send_command) (THD *thd, MYSQL *connection, bool set_active, unsigned char command, unsigned char *com_buffer, size_t buffer_length)

Execute clone command on remote server.

Parameters
[in,out]thdlocal session THD
[in,out]connectionconnection object
[in]set_activeset socket active for current THD
[in]commandremote command
[in]com_bufferdata following command
[in]buffer_lengthdata length
Returns
error code.

◆ mysql_clone_send_error

int(* s_mysql_clone_protocol::mysql_clone_send_error) (THD *thd, unsigned char err_cmd, bool is_fatal)

Send error to client.

Parameters
[in,out]thdserver session THD
[in]err_cmderror response command
[in]is_fatalif fatal error
Returns
error code.

◆ mysql_clone_send_response

int(* s_mysql_clone_protocol::mysql_clone_send_response) (THD *thd, bool secure, unsigned char *packet, size_t length)

Send response to client.

Parameters
[in,out]thdserver session THD
[in]secureneeds to be sent over secure connection
[in]packetresponse packet
[in]lengthpacket length
Returns
error code.

◆ mysql_clone_start_statement

void(* s_mysql_clone_protocol::mysql_clone_start_statement) (THD *&thd, unsigned int thread_key, unsigned int statement_key)

Start and set session and statement key form current thread.

Parameters
[in,out]thdserver session THD
[in]thread_keyPSI key for thread
[in]statement_keyPSI Key for statement

◆ mysql_clone_validate_charsets

int(* s_mysql_clone_protocol::mysql_clone_validate_charsets) (THD *thd, Mysql_Clone_Values &char_sets)

Check if all characters sets are supported by server.

Parameters
[in,out]thdserver session THD
[in]char_setsall character set collations to validate
Returns
error code.

◆ mysql_clone_validate_configs

int(* s_mysql_clone_protocol::mysql_clone_validate_configs) (THD *thd, Mysql_Clone_Key_Values &configs)

Check if configuration parameter values match.

Parameters
[in,out]thdserver session THD
[in]configsa list of configuration key value pair
Returns
error code.

The documentation for this struct was generated from the following file: