26#ifndef MYSQLD_MOCK_MYSQL_SERVER_MOCK_INCLUDED
27#define MYSQLD_MOCK_MYSQL_SERVER_MOCK_INCLUDED
38#include "mysql/harness/plugin.h"
71 std::vector<std::string> module_prefixes,
72 std::string bind_address,
unsigned bind_port,
73 std::string protocol,
bool debug_mode,
TLS Context for the server side.
Definition: tls_server_context.h:51
Monitor can be waited for.
Definition: monitor.h:62
PluginFuncEnv object.
Definition: loader.h:673
Definition: io_context.h:61
Main class.
Definition: mysql_server_mock.h:52
std::string expected_queries_file_
Definition: mysql_server_mock.h:93
bool debug_mode_
Definition: mysql_server_mock.h:91
void run(mysql_harness::PluginFuncEnv *env)
Starts handling the clients connections in infinite loop.
Definition: mysql_server_mock.cc:278
MySQLServerMock(net::io_context &io_ctx, std::string expected_queries_file, std::vector< std::string > module_prefixes, std::string bind_address, unsigned bind_port, std::string protocol, bool debug_mode, TlsServerContext &&tls_server_ctx, mysql_ssl_mode ssl_mode)
Constructor.
Definition: mysql_server_mock.cc:62
std::string protocol_name_
Definition: mysql_server_mock.h:95
unsigned bind_port_
Definition: mysql_server_mock.h:90
mysql_ssl_mode ssl_mode_
Definition: mysql_server_mock.h:99
WaitableMonitor< std::list< std::unique_ptr< MySQLServerMockSession > > > client_sessions_
Definition: mysql_server_mock.h:102
std::vector< std::string > module_prefixes_
Definition: mysql_server_mock.h:94
net::io_context & io_ctx_
Definition: mysql_server_mock.h:92
std::string bind_address_
Definition: mysql_server_mock.h:89
void close_all_connections()
close all open connections.
Definition: mysql_server_mock.cc:84
TlsServerContext tls_server_ctx_
Definition: mysql_server_mock.h:97
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
mysql_ssl_mode
Definition: mysql.h:272
Definition: mock_server_component.h:36