26#ifndef MYSQLD_MOCK_CLASSIC_MOCK_SESSION_INCLUDED
27#define MYSQLD_MOCK_CLASSIC_MOCK_SESSION_INCLUDED
33#include <openssl/ssl.h>
50 std::vector<uint8_t> &payload);
105 std::unique_ptr<StatementReaderBase> statement_processor,
108 protocol_{
std::move(client_sock), client_ep, tls_server_ctx},
128 const std::vector<uint8_t> &client_auth_method_data);
TLS Context for the server side.
Definition: tls_server_context.h:51
Definition: classic_mock_session.h:45
void server_capabilities(classic_protocol::capabilities::value_type v)
Definition: classic_mock_session.h:77
classic_protocol::capabilities::value_type shared_capabilities() const
Definition: classic_mock_session.h:89
uint8_t seq_no_
Definition: classic_mock_session.h:94
void encode_server_greeting(const classic_protocol::message::server::Greeting &greeting)
Definition: classic_mock_session.cc:737
classic_protocol::capabilities::value_type client_capabilities_
Definition: classic_mock_session.h:97
classic_protocol::capabilities::value_type server_capabilities_
Definition: classic_mock_session.h:96
void encode_auth_fast_message()
Definition: classic_mock_session.cc:715
uint8_t seq_no() const
Definition: classic_mock_session.h:71
void encode_ok(const OkResponse &msg) override
Definition: classic_mock_session.cc:875
void client_capabilities(classic_protocol::capabilities::value_type v)
Definition: classic_mock_session.h:85
stdx::expected< size_t, std::error_code > read_packet(std::vector< uint8_t > &payload)
Definition: classic_mock_session.cc:71
classic_protocol::capabilities::value_type server_capabilities() const
Definition: classic_mock_session.h:73
classic_protocol::capabilities::value_type client_capabilities() const
Definition: classic_mock_session.h:81
void encode_error(const ErrorResponse &msg) override
Definition: classic_mock_session.cc:863
void encode_auth_switch_message(const classic_protocol::message::server::AuthMethodSwitch &msg)
Definition: classic_mock_session.cc:726
void seq_no(uint8_t no)
Definition: classic_mock_session.h:69
void encode_resultset(const ResultsetResponse &response) override
Definition: classic_mock_session.cc:896
Definition: classic_mock_session.h:100
void send_response_then_disconnect()
Definition: classic_mock_session.cc:499
bool with_tls_
Definition: classic_mock_session.h:132
void idle()
Definition: classic_mock_session.cc:544
MySQLServerMockSessionClassic(ProtocolBase::socket_type client_sock, ProtocolBase::endpoint_type client_ep, TlsServerContext &tls_server_ctx, std::unique_ptr< StatementReaderBase > statement_processor, const bool debug_mode, const bool with_tls)
Definition: classic_mock_session.h:102
mysql_harness::logging::DomainLogger logger_
Definition: classic_mock_session.h:136
std::optional< StatementReaderBase::handshake_data > expected_handshake_
Definition: classic_mock_session.h:134
void cancel() override
Definition: classic_mock_session.h:113
MySQLClassicProtocol protocol_
Definition: classic_mock_session.h:130
void server_greeting()
Definition: classic_mock_session.cc:109
void terminate() override
Definition: classic_mock_session.h:115
void run() override
Definition: classic_mock_session.cc:713
stdx::expected< void, ErrorResponse > authenticate(const StatementReaderBase::handshake_data &handshake, const std::vector< uint8_t > &client_auth_method_data)
Definition: classic_mock_session.cc:782
void auth_switched()
Definition: classic_mock_session.cc:439
void send_response_then_idle()
Definition: classic_mock_session.cc:521
void finish()
Definition: classic_mock_session.cc:711
void client_greeting()
Definition: classic_mock_session.cc:173
Definition: mock_session.h:35
bool debug_mode() const
Definition: mock_session.h:50
Definition: statement_reader.h:96
void terminate()
terminate the current connection.
Definition: protocol_base.cc:137
ProtocolBase(socket_type client_sock, endpoint_type client_ep, TlsServerContext &tls_ctx)
Definition: protocol_base.cc:36
void cancel()
Definition: protocol_base.cc:132
typename protocol_type::endpoint endpoint_type
Definition: statement_reader.h:100
typename protocol_type::socket socket_type
Definition: statement_reader.h:99
std::bitset< 32 > value_type
Definition: classic_protocol_constants.h:73
borrowable::message::server::AuthMethodSwitch< false > AuthMethodSwitch
Definition: classic_protocol_message.h:1416
borrowable::message::server::Greeting< false > Greeting
Definition: classic_protocol_message.h:1413
Definition: mock_server_component.h:36
classic_protocol::message::server::Ok OkResponse
Definition: statement_reader.h:84
classic_protocol::message::server::Error ErrorResponse
Definition: statement_reader.h:85
Definition: gcs_xcom_synode.h:64
Keeps result data for single SQL statement that returns resultset.
Definition: statement_reader.h:77
Definition: statement_reader.h:396