Drizzled Public API Documentation

drizzle_plugin::mysql_unix_socket_protocol::ClientMySQLUnixSocketProtocol Class Reference
Inheritance diagram for drizzle_plugin::mysql_unix_socket_protocol::ClientMySQLUnixSocketProtocol:
drizzle_plugin::ClientMySQLProtocol drizzled::plugin::Client

List of all members.

Public Member Functions

 ClientMySQLUnixSocketProtocol (int fd, bool __using_mysql41_protocol, ProtocolCounters *set_counters)
bool isAdminAllowed (void)
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 store (const type::Time *from)
virtual bool store (const char *from)
virtual bool store (const std::string &from)
virtual bool haveError (void)
virtual bool haveMoreData (void)
virtual bool wasAborted (void)
virtual SessiongetSession (void)
virtual void setSession (Session *session_arg)
virtual bool isConsole () const
virtual
catalog::Instance::shared_ptr 
catalog ()

Static Public Member Functions

static void mysql_compose_ip_addresses (std::vector< std::string > options)

Public Attributes

ProtocolCounterscounters

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
Sessionsession

Detailed Description

Definition at line 59 of file protocol.h.


Member Function Documentation

bool drizzle_plugin::ClientMySQLProtocol::authenticate ( void  ) [virtual, inherited]

Perform handshake and authorize client if needed.

Implements drizzled::plugin::Client.

Definition at line 169 of file mysql_protocol.cc.

References drizzle_plugin::ClientMySQLProtocol::sendError(), and drizzle_plugin::ClientMySQLProtocol::sendOK().

void drizzle_plugin::ClientMySQLProtocol::close ( void  ) [virtual, inherited]

Close the client object.

Implements drizzled::plugin::Client.

Definition at line 152 of file mysql_protocol.cc.

bool drizzle_plugin::ClientMySQLProtocol::flush ( void  ) [virtual, inherited]

Flush all data that has been buffered with store() methods.

Return values:
Booleanindicating success or failure.

Implements drizzled::plugin::Client.

Definition at line 142 of file mysql_protocol.cc.

Referenced by drizzle_plugin::ClientMySQLProtocol::sendFields().

int drizzle_plugin::ClientMySQLProtocol::getFileDescriptor ( void  ) [virtual, inherited]

Get file descriptor associated with client object.

Return values:
Filedescriptor 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]

Get attached session from the client object.

Return values:
Sessionobject that is attached, NULL if none.

Definition at line 57 of file client.h.

bool drizzle_plugin::ClientMySQLProtocol::isConnected ( ) [virtual, inherited]

Check to see if the client is currently connected.

Return values:
Booleanvalue representing connected state.

Implements drizzled::plugin::Client.

Definition at line 127 of file mysql_protocol.cc.

bool drizzle_plugin::ClientMySQLProtocol::isReading ( void  ) [virtual, inherited]

Check to see if the client is actively reading.

Return values:
Booleanvalue representing reading state.

Implements drizzled::plugin::Client.

Definition at line 132 of file mysql_protocol.cc.

bool drizzle_plugin::ClientMySQLProtocol::isWriting ( void  ) [virtual, inherited]

Check to see if the client is actively writing.

Return values:
Booleanvalue 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, inherited]
void drizzle_plugin::ClientMySQLProtocol::sendEOF ( void  ) [virtual, inherited]

Send eof (= end of result set) to the client.

The eof packet has the following structure:

  • 254 (DRIZZLE_PROTOCOL_NO_MORE_DATA) : Marker (1 byte)
  • warning_count : Stored in 2 bytes; New in 4.1 client
  • status_flag : Stored in 2 bytes; For flags like SERVER_MORE_RESULTS_EXISTS.

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 drizzle_plugin::ClientMySQLProtocol::writeEOFPacket().

void drizzle_plugin::ClientMySQLProtocol::sendError ( const drizzled::error_t  sql_errno,
const char *  err 
) [virtual, inherited]

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 drizzle_plugin::ClientMySQLProtocol::authenticate(), and drizzle_plugin::ClientMySQLProtocol::readCommand().

Send name and type of result to client.

Sum fields has table name empty and field_name.

Parameters:
SessionThread data object
listList of items to send to client
flagBit mask with the following functions:
  • 1 send number of rows
  • 2 send default values
  • 4 don't write eof packet
Return values:
0ok
1Error (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 drizzle_plugin::ClientMySQLProtocol::flush(), and drizzle_plugin::ClientMySQLProtocol::writeEOFPacket().

void drizzle_plugin::ClientMySQLProtocol::sendOK ( void  ) [virtual, inherited]

Return ok to the client.

The ok packet has the following structure:

  • 0 : Marker (1 byte)
  • affected_rows : Stored in 1-9 bytes
  • id : Stored in 1-9 bytes
  • server_status : Copy of session->server_status; Can be used by client to check if we are inside an transaction. New in 4.0 client
  • warning_count : Stored in 2 bytes; New in 4.1 client
  • message : Stored as packed length (1-9 bytes) + message. Is not stored if no message.
Parameters:
sessionThread handler
affected_rowsNumber of rows changed by statement
idAuto_increment id for first row (if used)
messageMessage 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 drizzle_plugin::ClientMySQLProtocol::authenticate(), and drizzle_plugin::ClientMySQLProtocol::readCommand().

virtual void drizzled::plugin::Client::setSession ( Session session_arg) [inline, virtual, inherited]

Attach session to the client object.

Parameters:
[in]session_argSession object to attach, or NULL to clear.

Definition at line 66 of file client.h.

void drizzle_plugin::ClientMySQLProtocol::writeEOFPacket ( uint32_t  server_status,
uint32_t  total_warn_count 
) [protected, inherited]

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 drizzle_plugin::ClientMySQLProtocol::sendEOF(), and drizzle_plugin::ClientMySQLProtocol::sendFields().


The documentation for this class was generated from the following file: