MySQL 8.0.40
Source Code Documentation
|
attach a server connection and initialize it. More...
#include <classic_lazy_connect.h>
Public Types | |
enum class | Stage { Connect , Connected , Authenticated , SetVars , SetVarsDone , SetServerOption , SetServerOptionDone , SetSchema , SetSchemaDone , FetchSysVars , FetchSysVarsDone , Done } |
Public Types inherited from BasicProcessor | |
enum class | Result { Again , RecvFromClient , SendToClient , RecvFromServer , RecvFromBoth , SendToServer , SendableToServer , Suspend , Done , Void } |
Public Member Functions | |
LazyConnector (MysqlRoutingClassicConnectionBase *conn, bool in_handshake, std::function< void(const classic_protocol::message::server::Error &err)> on_error) | |
create a lazy-connector. More... | |
stdx::expected< Processor::Result, std::error_code > | process () override |
void | stage (Stage stage) |
Stage | stage () const |
Public Member Functions inherited from Processor | |
BasicProcessor (MysqlRoutingClassicConnectionBase *conn) | |
Public Member Functions inherited from BasicProcessor | |
BasicProcessor (MysqlRoutingClassicConnectionBase *conn) | |
virtual | ~BasicProcessor ()=default |
const MysqlRoutingClassicConnectionBase * | connection () const |
MysqlRoutingClassicConnectionBase * | connection () |
Private Member Functions | |
stdx::expected< Processor::Result, std::error_code > | connect () |
stdx::expected< Processor::Result, std::error_code > | connected () |
the handshake part. More... | |
stdx::expected< Processor::Result, std::error_code > | authenticated () |
stdx::expected< Processor::Result, std::error_code > | set_vars () |
stdx::expected< Processor::Result, std::error_code > | set_vars_done () |
stdx::expected< Processor::Result, std::error_code > | set_server_option () |
stdx::expected< Processor::Result, std::error_code > | set_server_option_done () |
stdx::expected< Processor::Result, std::error_code > | set_schema () |
stdx::expected< Processor::Result, std::error_code > | set_schema_done () |
stdx::expected< Processor::Result, std::error_code > | fetch_sys_vars () |
stdx::expected< Processor::Result, std::error_code > | fetch_sys_vars_done () |
Private Attributes | |
Stage | stage_ {Stage::Connect} |
bool | in_handshake_ |
std::function< void(const classic_protocol::message::server::Error &err)> | on_error_ |
Additional Inherited Members | |
Protected Member Functions inherited from Processor | |
stdx::expected< Result, std::error_code > | send_server_failed (std::error_code ec) |
stdx::expected< Result, std::error_code > | recv_server_failed (std::error_code ec) |
stdx::expected< Result, std::error_code > | send_client_failed (std::error_code ec) |
stdx::expected< Result, std::error_code > | recv_client_failed (std::error_code ec) |
stdx::expected< Result, std::error_code > | server_socket_failed (std::error_code ec) |
stdx::expected< Result, std::error_code > | client_socket_failed (std::error_code ec) |
stdx::expected< void, std::error_code > | discard_current_msg (Channel *src_channel, ClassicProtocolState *src_protocol) |
discard to current message. More... | |
void | trace (Tracer::Event e) |
Tracer & | tracer () |
Static Protected Member Functions inherited from Processor | |
static void | log_fatal_error_code (const char *msg, std::error_code ec) |
log a message with error-code as error. More... | |
attach a server connection and initialize it.
Precondition:
|
strong |
|
inline |
create a lazy-connector.
conn | a connection handle |
in_handshake | if true, the client connection is in Greeting or ChangeUser right now. |
on_error | function that's called if an error happened. |
If "in_handshake" the LazyConnector may ask the client for a "auth-method-switch" or a "plaintext-password".
|
private |
|
private |
|
private |
the handshake part.
|
private |
|
private |
|
overridevirtual |
Implements BasicProcessor.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
|
inline |
|
private |
|
private |
|
private |