My Project
|
Public Member Functions | |
Protocol_local (THD *thd, Ed_connection *ed_connection) | |
Protected Member Functions | |
virtual void | prepare_for_resend () |
virtual bool | write () |
virtual bool | store_null () |
virtual bool | store_tiny (longlong from) |
virtual bool | store_short (longlong from) |
virtual bool | store_long (longlong from) |
virtual bool | store_longlong (longlong from, bool unsigned_flag) |
virtual bool | store_decimal (const my_decimal *) |
virtual bool | store (const char *from, size_t length, const CHARSET_INFO *cs) |
virtual bool | store (const char *from, size_t length, const CHARSET_INFO *fromcs, const CHARSET_INFO *tocs) |
virtual bool | store (MYSQL_TIME *time, uint precision) |
virtual bool | store_date (MYSQL_TIME *time) |
virtual bool | store_time (MYSQL_TIME *time, uint precision) |
virtual bool | store (float value, uint32 decimals, String *buffer) |
virtual bool | store (double value, uint32 decimals, String *buffer) |
virtual bool | store (Field *field) |
virtual bool | send_result_set_metadata (List< Item > *list, uint flags) |
virtual bool | send_out_parameters (List< Item_param > *sp_params) |
virtual enum enum_protocol_type | type () |
virtual bool | send_ok (uint server_status, uint statement_warn_count, ulonglong affected_rows, ulonglong last_insert_id, const char *message) |
virtual bool | send_eof (uint server_status, uint statement_warn_count) |
virtual bool | send_error (uint sql_errno, const char *err_msg, const char *sqlstate) |
Protocol_local: a helper class to intercept the result of the data written to the network.
void Protocol_local::prepare_for_resend | ( | ) | [protected, virtual] |
Called between two result set rows.
Prepare structures to fill result set rows. Unfortunately, we can't return an error here. If memory allocation fails, we'll have to return an error later. And so is done in methods such as
Implements Protocol.
bool Protocol_local::send_eof | ( | uint | server_status, |
uint | statement_warn_count | ||
) | [protected, virtual] |
Called at the end of a result set. Append a complete result set to the list in Ed_connection.
Don't send anything to the client, but instead finish building of the result set at hand.
Reimplemented from Protocol.
bool Protocol_local::send_error | ( | uint | sql_errno, |
const char * | err_msg, | ||
const char * | sqlstate | ||
) | [protected, virtual] |
Called to send an error to the client at the end of a statement.
Reimplemented from Protocol.
bool Protocol_local::send_ok | ( | uint | server_status, |
uint | statement_warn_count, | ||
ulonglong | affected_rows, | ||
ulonglong | last_insert_id, | ||
const char * | message | ||
) | [protected, virtual] |
Called for statements that don't have a result set, at statement end.
Reimplemented from Protocol.
bool Protocol_local::send_out_parameters | ( | List< Item_param > * | sp_params | ) | [protected, virtual] |
Normally this is a separate result set with OUT parameters of stored procedures. Currently unsupported for the local version.
Implements Protocol.
bool Protocol_local::send_result_set_metadata | ( | List< Item > * | columns, |
uint | flags | ||
) | [protected, virtual] |
Called to start a new result set.
Reimplemented from Protocol.
bool Protocol_local::store | ( | const char * | str, |
size_t | length, | ||
const CHARSET_INFO * | src_cs | ||
) | [protected, virtual] |
Convert to cs_results and store a string.
Implements Protocol.
bool Protocol_local::store | ( | const char * | str, |
size_t | length, | ||
const CHARSET_INFO * | src_cs, | ||
const CHARSET_INFO * | dst_cs | ||
) | [protected, virtual] |
Store a string.
Implements Protocol.
bool Protocol_local::store_date | ( | MYSQL_TIME * | time | ) | [protected, virtual] |
Store MYSQL_TIME (in binary format)
Implements Protocol.
bool Protocol_local::store_decimal | ( | const my_decimal * | value | ) | [protected, virtual] |
Store a decimal in string format in a result set column
Implements Protocol.
bool Protocol_local::store_long | ( | longlong | value | ) | [protected, virtual] |
Store a "long" as is (4 bytes, host order) in a result set column.
Implements Protocol.
bool Protocol_local::store_longlong | ( | longlong | value, |
bool | unsigned_flag | ||
) | [protected, virtual] |
Store a "longlong" as is (8 bytes, host order) in a result set column.
Implements Protocol.
bool Protocol_local::store_null | ( | ) | [protected, virtual] |
Add a NULL column to the current row.
Implements Protocol.
bool Protocol_local::store_short | ( | longlong | value | ) | [protected, virtual] |
Store a short as is (2 bytes, host order) in a result set column.
Implements Protocol.
bool Protocol_local::store_time | ( | MYSQL_TIME * | time, |
uint | precision | ||
) | [protected, virtual] |
Store MYSQL_TIME (in binary format)
Implements Protocol.
bool Protocol_local::store_tiny | ( | longlong | value | ) | [protected, virtual] |
Store a tiny int as is (1 byte) in a result set column.
Implements Protocol.
bool Protocol_local::write | ( | ) | [protected, virtual] |
In "real" protocols this is called to finish a result set row. Unused in the local implementation.
Reimplemented from Protocol.