MySQL 8.0.39
Source Code Documentation
|
#include <mysql/components/component_implementation.h>
#include <mysql/components/services/clone_protocol_service.h>
#include "mysql.h"
#include "sql/sql_class.h"
#include "sql/sql_thd_internal_api.h"
#include "sql_common.h"
Go to the source code of this file.
Functions | |
void | mysql_clone_start_statement (THD *&thd, PSI_thread_key thread_key, PSI_statement_key statement_key) noexcept |
Start and set session and statement key form current thread. More... | |
void | mysql_clone_finish_statement (THD *thd) noexcept |
Finish statement and session. More... | |
int | mysql_clone_get_charsets (THD *thd, Mysql_Clone_Values &char_sets) noexcept |
Get all character set and collations. More... | |
int | mysql_clone_validate_charsets (THD *thd, Mysql_Clone_Values &char_sets) noexcept |
Check if all characters sets are supported by server. More... | |
int | mysql_clone_get_configs (THD *thd, Mysql_Clone_Key_Values &configs) noexcept |
Get system configuration parameter values. More... | |
int | mysql_clone_validate_configs (THD *thd, Mysql_Clone_Key_Values &configs) noexcept |
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) noexcept |
Connect to a remote server and switch to clone protocol. More... | |
int | mysql_clone_send_command (THD *thd, MYSQL *connection, bool set_active, uchar command, uchar *com_buffer, size_t buffer_length) noexcept |
Execute clone command on remote server. More... | |
int | mysql_clone_get_response (THD *thd, MYSQL *connection, bool set_active, uint32_t timeout, uchar **packet, size_t *length, size_t *net_length) noexcept |
Get response from remote server. More... | |
int | mysql_clone_kill (MYSQL *connection, MYSQL *kill_connection) noexcept |
Kill a remote connection. More... | |
void | mysql_clone_disconnect (THD *thd, MYSQL *mysql, bool is_fatal, bool clear_error) noexcept |
Disconnect from a remote server. More... | |
void | mysql_clone_get_error (THD *thd, uint32_t *err_num, const char **err_mesg) noexcept |
Get error number and message. More... | |
int | mysql_clone_get_command (THD *thd, uchar *command, uchar **com_buffer, size_t *buffer_length) noexcept |
Get command from client. More... | |
int | mysql_clone_send_response (THD *thd, bool secure, uchar *packet, size_t length) noexcept |
Send response to client. More... | |
int | mysql_clone_send_error (THD *thd, uchar err_cmd, bool is_fatal) noexcept |
Send error to client. More... | |
|
noexcept |
Connect to a remote server and switch to clone protocol.
[in,out] | thd | server session THD |
[in] | host | host name to connect to |
[in] | port | port number to connect to |
[in] | user | user name on remote host |
[in] | passwd | password for the user |
[in] | ssl_ctx | client ssl context |
[out] | socket | Network socket for the connection |
Disconnect from a remote server.
[in,out] | thd | local session THD |
[in,out] | mysql | connection object |
[in] | is_fatal | if closing after fatal error |
[in] | clear_error | clear any earlier error in session |
|
noexcept |
Finish statement and session.
[in,out] | thd | server session THD |
|
noexcept |
Get all character set and collations.
[in,out] | thd | server session THD |
[out] | char_sets | all character set collations |
|
noexcept |
Get command from client.
[in,out] | thd | server session THD |
[out] | command | remote command |
[out] | com_buffer | data following command |
[out] | buffer_length | data length |
|
noexcept |
Get system configuration parameter values.
[in,out] | thd | server session THD |
[in,out] | configs | a list of configuration key value pair keys are input and values are output |
|
noexcept |
Get error number and message.
[in,out] | thd | local session THD |
[out] | err_num | error number |
[out] | err_mesg | error message text |
|
noexcept |
Get response from remote server.
[in,out] | thd | local session THD |
[in,out] | connection | connection object |
[in] | set_active | set socket active for current THD |
[in] | timeout | timeout in seconds |
[out] | packet | response packet |
[out] | length | packet length |
[out] | net_length | network data length for compressed data |
Kill a remote connection.
[in,out] | connection | connection object |
[in] | kill_connection | connection to kill |
|
noexcept |
Execute clone command on remote server.
[in,out] | thd | local session THD |
[in,out] | connection | connection object |
[in] | set_active | set socket active for current THD |
[in] | command | remote command |
[in] | com_buffer | data following command |
[in] | buffer_length | data length |
Send error to client.
[in,out] | thd | server session THD |
[in] | err_cmd | error response command |
[in] | is_fatal | if fatal error |
Send response to client.
[in,out] | thd | server session THD |
[in] | secure | needs to be sent over secure connection |
[in] | packet | response packet |
[in] | length | packet length |
|
noexcept |
Start and set session and statement key form current thread.
[in,out] | thd | server session THD |
[in] | thread_key | PSI key for thread |
[in] | statement_key | PSI Key for statement |
|
noexcept |
Check if all characters sets are supported by server.
[in,out] | thd | server session THD |
[in] | char_sets | all character set collations to validate |
|
noexcept |
Check if configuration parameter values match.
[in,out] | thd | server session THD |
[in] | configs | a list of configuration key value pair |