24#ifndef PROTOCOL_CALLBACK_INCLUDED
25#define PROTOCOL_CALLBACK_INCLUDED
276 int shutdown(
bool server_shutdown =
false)
override;
364 ulonglong last_insert_id,
const char *message)
override;
379 bool send_eof(uint server_status, uint warn_count)
override;
391 bool send_error(uint sql_errno,
const char *err_msg,
392 const char *sql_state)
override;
394 bool store_ps_status(ulong stmt_id, uint column_count, uint param_count,
395 ulong cond_count)
override;
398 bool is_sql_prepare)
override;
399 bool flush()
override;
Dynamic parameters used as placeholders ('?') inside prepared statements.
Definition: item.h:4759
Definition: sql_list.h:467
Definition: protocol_callback.h:53
bool store_date(const MYSQL_TIME &time) override
Sends DATE value.
Definition: protocol_callback.cc:155
bool connection_alive() const override
This function always returns true as in many places in the server this is a prerequisite for continui...
Definition: protocol_callback.cc:280
enum enum_vio_type connection_type() const override
Returns the type of the connection.
Definition: protocol_callback.cc:84
Protocol_callback(const struct st_command_service_cbs *cbs, enum cs_text_or_binary t_or_b, void *cbs_ctx)
Definition: protocol_callback.h:55
int read_packet() override
Forces read of packet from the connection.
Definition: protocol_callback.cc:65
bool client_capabilities_set
Definition: protocol_callback.h:424
ulong get_client_capabilities() override
Returns the capabilities supported by the protocol.
Definition: protocol_callback.cc:182
bool send_error(uint sql_errno, const char *err_msg, const char *sql_state) override
Sends error.
Definition: protocol_callback.cc:426
bool store_double(double from, uint32 decimals, uint32) override
Sends DOUBLE value.
Definition: protocol_callback.cc:143
bool set_variables_from_parameters(List< Item_param > *parameters)
Set output parameters to variables bound at PS execution.
Definition: protocol_callback.cc:503
int get_command(COM_DATA *com_data, enum_server_command *cmd) override
Reads from the line and parses the data into union COM_DATA.
Definition: protocol_callback.cc:74
bool send_field_metadata(Send_field *field, const CHARSET_INFO *cs) override
Sends metadata of one field.
Definition: protocol_callback.cc:346
bool store_field(const Field *field) override
Sends Field.
Definition: protocol_callback.cc:166
bool get_compression() override
Checks if compression is enabled.
Definition: protocol_callback.cc:305
bool store_time(const MYSQL_TIME &time, uint precision) override
Sends TIME value.
Definition: protocol_callback.cc:160
bool send_ok(uint server_status, uint warn_count, ulonglong affected_rows, ulonglong last_insert_id, const char *message) override
Sends OK.
Definition: protocol_callback.cc:394
char * get_compression_algorithm() override
Checks if compression is enabled and return compression method name.
Definition: protocol_callback.cc:313
bool end_result_metadata() override
Called AFTER sending metadata.
Definition: protocol_callback.cc:374
bool send_parameters(List< Item_param > *parameters, bool is_sql_prepare) override
Sends the OUT-parameters to the client.
Definition: protocol_callback.cc:455
int shutdown(bool server_shutdown=false) override
Called when the server shuts down the connection (THD is being destroyed).
Definition: protocol_callback.cc:261
void start_row() override
Called BEFORE sending data row or before field_metadata.
Definition: protocol_callback.cc:198
uint get_rw_status() override
Should return protocol's reading/writing status.
Definition: protocol_callback.cc:297
bool send_eof(uint server_status, uint warn_count) override
Sends end of file.
Definition: protocol_callback.cc:412
struct st_command_service_cbs callbacks
Definition: protocol_callback.h:422
bool end_row() override
Called AFTER sending data row or before field_metadata.
Definition: protocol_callback.cc:226
bool start_result_metadata(uint num_cols, uint flags, const CHARSET_INFO *resultcs) override
Called BEFORE sending metadata.
Definition: protocol_callback.cc:330
bool store_longlong(longlong from, bool is_unsigned, uint32) override
Sends BIGINT value.
Definition: protocol_callback.cc:109
enum enum_protocol_type type() const override
Returns the type of the protocol.
Definition: protocol_callback.h:86
uint get_compression_level() override
Checks if compression is enabled and return compression level.
Definition: protocol_callback.cc:321
bool store_datetime(const MYSQL_TIME &time, uint precision) override
Sends DATETIME value.
Definition: protocol_callback.cc:149
bool store_null() override
Sends null value.
Definition: protocol_callback.cc:88
void abort_row() override
Called when a row is aborted.
Definition: protocol_callback.cc:236
bool store_ps_status(ulong stmt_id, uint column_count, uint param_count, ulong cond_count) override
Sends prepared statement's id and metadata to the client after prepare.
Definition: protocol_callback.cc:433
unsigned long client_capabilities
Definition: protocol_callback.h:423
void * callbacks_ctx
Definition: protocol_callback.h:421
bool store_string(const char *from, size_t length, const CHARSET_INFO *fromcs) override
Sends string (CHAR/VARCHAR/TEXT/BLOB) value.
Definition: protocol_callback.cc:130
bool store_float(float from, uint32 decimals, uint32) override
Sends FLOAT value.
Definition: protocol_callback.cc:137
bool in_meta_sending
Definition: protocol_callback.h:426
bool flush() override
Used for the classic protocol.
Definition: protocol_callback.cc:403
bool store_short(longlong from, uint32) override
Sends SMALLINT value.
Definition: protocol_callback.cc:99
enum cs_text_or_binary text_or_binary
Definition: protocol_callback.h:425
void end_partial_result_set() override
Called in case of error while sending data.
Definition: protocol_callback.cc:243
bool store_long(longlong from, uint32) override
Sends INT/INTEGER value.
Definition: protocol_callback.cc:104
bool store_decimal(const my_decimal *d, uint, uint) override
Sends DECIMAL value.
Definition: protocol_callback.cc:125
bool has_client_capability(unsigned long capability) override
Checks if the protocol supports a capability.
Definition: protocol_callback.cc:190
bool store_tiny(longlong from, uint32) override
Sends TINYINT value.
Definition: protocol_callback.cc:94
Definition: protocol.h:33
virtual bool store_short(longlong from, uint32 zerofill)=0
virtual bool store_long(longlong from, uint32 zerofill)=0
enum_protocol_type
Enum used by type() to specify the protocol type.
Definition: protocol.h:101
@ PROTOCOL_PLUGIN
Definition: protocol.h:107
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
my_decimal class limits 'decimal_t' type to what we need in MySQL.
Definition: my_decimal.h:95
static int flags[50]
Definition: hp_test1.cc:40
A better implementation of the UNIX ctype(3) library.
enum_server_command
A list of all MySQL protocol commands.
Definition: my_command.h:48
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
long long int longlong
Definition: my_inttypes.h:55
uint32_t uint32
Definition: my_inttypes.h:67
Time declarations shared between the server and client API: you should not add anything to this heade...
constexpr value_type is_unsigned
Definition: classic_protocol_constants.h:273
Definition: commit_order_queue.h:34
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:76
Header file for the Command service.
cs_text_or_binary
Definition: service_command.h:389
Definition: m_ctype.h:423
Definition: mysql_time.h:82
Definition: service_command.h:328
Definition: com_data.h:104
enum_vio_type
Definition: violite.h:79