Public Member Functions | |
ClientMySQLProtocol (int fd, ProtocolCounters &) | |
bool | isInteractive () const |
virtual int | getFileDescriptor () |
virtual bool | isConnected () |
virtual bool | flush () |
virtual void | close () |
virtual bool | authenticate () |
virtual bool | readCommand (char **packet, uint32_t &packet_length) |
virtual void | sendOK () |
virtual void | sendEOF () |
virtual void | sendError (const drizzled::error_t sql_errno, const char *err) |
virtual void | sendFields (drizzled::List< drizzled::Item > &) |
virtual void | store (drizzled::Field *) |
virtual void | store () |
virtual void | store (int32_t from) |
virtual void | store (uint32_t from) |
virtual void | store (int64_t from) |
virtual void | store (uint64_t from) |
virtual void | store (double from, uint32_t decimals, drizzled::String *buffer) |
virtual void | store (const char *, size_t) |
virtual bool | haveError () |
virtual bool | wasAborted () |
virtual Session * | getSession () |
virtual void | setSession (Session *session_arg) |
virtual bool | isConsole () const |
virtual catalog::Instance::shared_ptr | catalog () |
virtual void | store (const type::Time *from) |
virtual void | store (const char *from) |
virtual void | store (str_ref from) |
Public Attributes | |
ProtocolCounters & | counters |
Protected Member Functions | |
bool | checkConnection () |
void | netStoreData (const void *, size_t) |
void | writeEOFPacket (uint32_t server_status, uint32_t total_warn_count) |
unsigned char * | storeLength (unsigned char *packet, uint64_t length) |
void | makeScramble (char *scramble) |
Protected Attributes | |
NET | net |
drizzled::String | packet |
uint32_t | client_capabilities |
bool | _is_interactive |
Session * | session |
Definition at line 65 of file mysql_protocol.h.
|
virtual |
Perform handshake and authorize client if needed.
Implements drizzled::plugin::Client.
Definition at line 142 of file mysql_protocol.cc.
References sendError(), and sendOK().
|
virtual |
Close the client object.
Implements drizzled::plugin::Client.
Definition at line 132 of file mysql_protocol.cc.
|
virtual |
Flush all data that has been buffered with store() methods.
Boolean | indicating success or failure. |
Implements drizzled::plugin::Client.
Definition at line 123 of file mysql_protocol.cc.
Referenced by sendFields().
|
virtual |
Get file descriptor associated with client object.
File | descriptor that is attached, -1 if none. |
Implements drizzled::plugin::Client.
Definition at line 113 of file mysql_protocol.cc.
|
inlinevirtualinherited |
|
virtual |
Check to see if the client is currently connected.
Boolean | value representing connected state. |
Implements drizzled::plugin::Client.
Definition at line 118 of file mysql_protocol.cc.
|
virtual |
Read command from client.
Implements drizzled::plugin::Client.
Definition at line 177 of file mysql_protocol.cc.
References drizzled::Diagnostics_area::DA_ERROR, sendError(), sendOK(), and drizzled::Session::variables.
|
virtual |
Send eof (= end of result set) to the client.
The eof packet has the following structure:
Note that the warning count will not be sent if 'no_flush' is set as we don't want to report the warning count until all data is sent to the client.
Implements drizzled::plugin::Client.
Definition at line 358 of file mysql_protocol.cc.
References drizzled::Diagnostics_area::can_overwrite_status, and writeEOFPacket().
|
virtual |
Send a error string to client.
For SIGNAL/RESIGNAL and GET DIAGNOSTICS functionality it's critical that every error that can be intercepted is issued in one place only, my_message_sql.
Implements drizzled::plugin::Client.
Definition at line 372 of file mysql_protocol.cc.
References drizzled::Diagnostics_area::can_overwrite_status.
Referenced by authenticate(), and readCommand().
|
virtual |
Send name and type of result to client.
Sum fields has table name empty and field_name.
Session | Thread data object |
list | List of items to send to client |
flag | Bit mask with the following functions:
|
0 | ok |
1 | Error (Note that in this case the error is not sent to the client) |
Implements drizzled::plugin::Client.
Definition at line 435 of file mysql_protocol.cc.
References flush(), and writeEOFPacket().
|
virtual |
Return ok to the client.
The ok packet has the following structure:
session | Thread handler |
affected_rows | Number of rows changed by statement |
id | Auto_increment id for first row (if used) |
message | Message to send to the client (Used by mysql_status) |
Implements drizzled::plugin::Client.
Definition at line 291 of file mysql_protocol.cc.
References drizzled::Diagnostics_area::can_overwrite_status, and drizzled::Diagnostics_area::DA_OK.
Referenced by authenticate(), and readCommand().
|
inlinevirtualinherited |
|
protected |
Format EOF packet according to the current client and write it to the network output buffer.
Definition at line 820 of file mysql_protocol.cc.
References drizzled::Session::is_fatal_error.
Referenced by sendEOF(), and sendFields().