23#ifndef MYSQL_CLONE_PROTOCOL_SERVICE
24#define MYSQL_CLONE_PROTOCOL_SERVICE
82 (
THD * &thd,
unsigned int thread_key,
83 unsigned int statement_key));
157 unsigned char command,
unsigned char *com_buffer,
158 size_t buffer_length));
173 unsigned char **packet,
size_t *
length,
size_t *net_length));
192 (
THD * thd,
MYSQL *connection,
bool is_fatal,
bool clear_error));
200 (
THD * thd, uint32_t *err_num,
const char **err_mesg));
211 (
THD * thd,
unsigned char *
command,
unsigned char **com_buffer,
212 size_t *buffer_length));
223 (
THD * thd,
bool secure,
unsigned char *packet,
size_t length));
233 (
THD * thd,
unsigned char err_cmd,
bool is_fatal));
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:35
int mysql_clone_send_response(THD *thd, bool secure, uchar *packet, size_t length) noexcept
Send response to client.
Definition: clone_protocol_service.cc:700
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.
Definition: clone_protocol_service.cc:464
int mysql_clone_kill(MYSQL *connection, MYSQL *kill_connection) noexcept
Kill a remote connection.
Definition: clone_protocol_service.cc:592
void mysql_clone_finish_statement(THD *thd) noexcept
Finish statement and session.
Definition: clone_protocol_service.cc:131
void mysql_clone_disconnect(THD *thd, MYSQL *mysql, bool is_fatal, bool clear_error) noexcept
Disconnect from a remote server.
Definition: clone_protocol_service.cc:607
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.
Definition: clone_protocol_service.cc:502
int mysql_clone_send_error(THD *thd, uchar err_cmd, bool is_fatal) noexcept
Send error to client.
Definition: clone_protocol_service.cc:728
int mysql_clone_get_charsets(THD *thd, Mysql_Clone_Values &char_sets) noexcept
Get all character set and collations.
Definition: clone_protocol_service.cc:145
void mysql_clone_get_error(THD *thd, uint32_t *err_num, const char **err_mesg) noexcept
Get error number and message.
Definition: clone_protocol_service.cc:635
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.
Definition: clone_protocol_service.cc:90
int mysql_clone_get_configs(THD *thd, Mysql_Clone_Key_Values &configs) noexcept
Get system configuration parameter values.
Definition: clone_protocol_service.cc:229
int mysql_clone_validate_charsets(THD *thd, Mysql_Clone_Values &char_sets) noexcept
Check if all characters sets are supported by server.
Definition: clone_protocol_service.cc:167
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.
Definition: clone_protocol_service.cc:343
int mysql_clone_get_command(THD *thd, uchar *command, uchar **com_buffer, size_t *buffer_length) noexcept
Get command from client.
Definition: clone_protocol_service.cc:655
int mysql_clone_validate_configs(THD *thd, Mysql_Clone_Key_Values &configs) noexcept
Check if configuration parameter values match.
Definition: clone_protocol_service.cc:286
std::vector< std::pair< std::string, std::string > > Mysql_Clone_Key_Values
Vector of string Key-Value pairs.
Definition: clone_protocol_service.h:71
std::vector< std::string > Mysql_Clone_Values
Vector of string values.
Definition: clone_protocol_service.h:68
Definitions private to the server, used in the networking layer to notify specific events.
char * user
Definition: mysqladmin.cc:64
const char * host
Definition: mysqladmin.cc:63
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:497
stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol)
Definition: socket.h:62
void set_active(space_id_t space_id)
Set an undo tablespace active.
Definition: trx0purge.cc:1136
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:32
#define DECLARE_METHOD(retval, name, args)
Declares a method as a part of the Service definition.
Definition: service.h:102
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
An instrumented socket.
Definition: mysql_socket_bits.h:34
Definition: mysql_com_server.h:58
Connection parameters including SSL.
Definition: clone_protocol_service.h:52
int m_ssl_mode
Clone ssl mode.
Definition: clone_protocol_service.h:54
NET_SERVER * m_server_extn
Definition: clone_protocol_service.h:64
const char * m_ssl_key
Clone ssl private key.
Definition: clone_protocol_service.h:56
bool m_enable_compression
Enable network compression.
Definition: clone_protocol_service.h:63
const char * m_ssl_ca
Clone ssl certificate authority.
Definition: clone_protocol_service.h:60
const char * m_ssl_cert
Clone ssl certificate.
Definition: clone_protocol_service.h:58
command
Definition: version_token.cc:279