Public Member Functions | |
| ClientMySQLProtocol (int fd, bool _using_mysql41_protocol, ProtocolCounters *set_counters) | |
| bool | isInteractive () const |
| bool | isAdmin () const |
| virtual int | getFileDescriptor (void) |
| virtual bool | isConnected () |
| virtual bool | isReading (void) |
| virtual bool | isWriting (void) |
| virtual bool | flush (void) |
| virtual void | close (void) |
| virtual bool | authenticate (void) |
| virtual bool | readCommand (char **packet, uint32_t *packet_length) |
| virtual void | sendOK (void) |
| virtual void | sendEOF (void) |
| virtual void | sendError (const drizzled::error_t sql_errno, const char *err) |
| virtual bool | sendFields (drizzled::List< drizzled::Item > *list) |
| virtual bool | store (drizzled::Field *from) |
| virtual bool | store (void) |
| virtual bool | store (int32_t from) |
| virtual bool | store (uint32_t from) |
| virtual bool | store (int64_t from) |
| virtual bool | store (uint64_t from) |
| virtual bool | store (double from, uint32_t decimals, drizzled::String *buffer) |
| virtual bool | store (const char *from, size_t length) |
| virtual bool | haveError (void) |
| virtual bool | haveMoreData (void) |
| virtual bool | wasAborted (void) |
| virtual bool | isAdminAllowed (void) |
| virtual Session * | getSession (void) |
| virtual void | setSession (Session *session_arg) |
| virtual bool | isConsole () const |
|
virtual catalog::Instance::shared_ptr | catalog () |
| virtual bool | store (const type::Time *from) |
| virtual bool | store (const char *from) |
| virtual bool | store (const std::string &from) |
Static Public Member Functions | |
| static void | mysql_compose_ip_addresses (std::vector< std::string > options) |
Public Attributes | |
| ProtocolCounters * | counters |
Static Public Attributes | |
| static std::vector< std::string > | mysql_admin_ip_addresses |
Protected Member Functions | |
| bool | checkConnection (void) |
| bool | netStoreData (const unsigned char *from, size_t length) |
| 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_admin_connection |
| bool | _using_mysql41_protocol |
| bool | _is_interactive |
| Session * | session |
Definition at line 74 of file mysql_protocol.h.
| bool drizzle_plugin::ClientMySQLProtocol::authenticate | ( | void | ) | [virtual] |
Perform handshake and authorize client if needed.
Implements drizzled::plugin::Client.
Definition at line 169 of file mysql_protocol.cc.
References sendError(), and sendOK().
| void drizzle_plugin::ClientMySQLProtocol::close | ( | void | ) | [virtual] |
Close the client object.
Implements drizzled::plugin::Client.
Definition at line 152 of file mysql_protocol.cc.
| bool drizzle_plugin::ClientMySQLProtocol::flush | ( | void | ) | [virtual] |
Flush all data that has been buffered with store() methods.
| Boolean | indicating success or failure. |
Implements drizzled::plugin::Client.
Definition at line 142 of file mysql_protocol.cc.
Referenced by sendFields().
| int drizzle_plugin::ClientMySQLProtocol::getFileDescriptor | ( | void | ) | [virtual] |
Get file descriptor associated with client object.
| File | descriptor that is attached, -1 if none. |
Implements drizzled::plugin::Client.
Definition at line 122 of file mysql_protocol.cc.
| virtual Session* drizzled::plugin::Client::getSession | ( | void | ) | [inline, virtual, inherited] |
| bool drizzle_plugin::ClientMySQLProtocol::isConnected | ( | ) | [virtual] |
Check to see if the client is currently connected.
| Boolean | value representing connected state. |
Implements drizzled::plugin::Client.
Definition at line 127 of file mysql_protocol.cc.
| bool drizzle_plugin::ClientMySQLProtocol::isReading | ( | void | ) | [virtual] |
Check to see if the client is actively reading.
| Boolean | value representing reading state. |
Implements drizzled::plugin::Client.
Definition at line 132 of file mysql_protocol.cc.
| bool drizzle_plugin::ClientMySQLProtocol::isWriting | ( | void | ) | [virtual] |
Check to see if the client is actively writing.
| Boolean | value representing writing state. |
Implements drizzled::plugin::Client.
Definition at line 137 of file mysql_protocol.cc.
| bool drizzle_plugin::ClientMySQLProtocol::readCommand | ( | char ** | packet, |
| uint32_t * | packet_length | ||
| ) | [virtual] |
Read command from client.
Implements drizzled::plugin::Client.
Definition at line 215 of file mysql_protocol.cc.
References drizzled::Diagnostics_area::DA_ERROR, sendError(), sendOK(), and drizzled::Session::variables.
| void drizzle_plugin::ClientMySQLProtocol::sendEOF | ( | void | ) | [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 400 of file mysql_protocol.cc.
References drizzled::Diagnostics_area::can_overwrite_status, and writeEOFPacket().
| void drizzle_plugin::ClientMySQLProtocol::sendError | ( | const drizzled::error_t | sql_errno, |
| const char * | err | ||
| ) | [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 415 of file mysql_protocol.cc.
References drizzled::Diagnostics_area::can_overwrite_status.
Referenced by authenticate(), and readCommand().
| bool drizzle_plugin::ClientMySQLProtocol::sendFields | ( | drizzled::List< drizzled::Item > * | list | ) | [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 487 of file mysql_protocol.cc.
References flush(), and writeEOFPacket().
| void drizzle_plugin::ClientMySQLProtocol::sendOK | ( | void | ) | [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 333 of file mysql_protocol.cc.
References drizzled::Diagnostics_area::can_overwrite_status, and drizzled::Diagnostics_area::DA_OK.
Referenced by authenticate(), and readCommand().
| virtual void drizzled::plugin::Client::setSession | ( | Session * | session_arg | ) | [inline, virtual, inherited] |
| void drizzle_plugin::ClientMySQLProtocol::writeEOFPacket | ( | uint32_t | server_status, |
| uint32_t | total_warn_count | ||
| ) | [protected] |
Format EOF packet according to the current client and write it to the network output buffer.
Definition at line 923 of file mysql_protocol.cc.
References drizzled::Session::is_fatal_error.
Referenced by sendEOF(), and sendFields().