26#ifndef MYSQLD_MOCK_DUKTAPE_STATEMENT_READER_INCLUDED
27#define MYSQLD_MOCK_DUKTAPE_STATEMENT_READER_INCLUDED
43 std::string
filename, std::vector<std::string> module_prefixes,
44 std::map<std::string, std::function<std::string()>> session,
45 std::shared_ptr<MockServerGlobalScope> global_scope)
57 throw std::logic_error(
"this should not be called.");
84 std::unique_ptr<StatementReaderBase>
operator()();
98 std::string
filename, std::vector<std::string> module_prefixes,
99 std::map<std::string, std::function<std::string()>> session_data,
100 std::shared_ptr<MockServerGlobalScope> shared_globals);
Definition: duktape_statement_reader.h:51
std::chrono::microseconds server_greeting_exec_time() override
Definition: duktape_statement_reader.h:74
std::vector< AsyncNotice > get_async_notices() override
Definition: duktape_statement_reader.h:62
std::string what_
Definition: duktape_statement_reader.h:81
std::chrono::microseconds get_default_exec_time() override
Returns the default execution time in microseconds.
Definition: duktape_statement_reader.h:60
void set_session_ssl_info(const SSL *) override
Definition: duktape_statement_reader.h:78
stdx::expected< classic_protocol::message::server::Greeting, std::error_code > server_greeting(bool) override
Definition: duktape_statement_reader.h:65
stdx::expected< handshake_data, ErrorResponse > handshake() override
Definition: duktape_statement_reader.h:70
FailedStatementReader(std::string what)
Definition: duktape_statement_reader.h:53
void handle_statement(const std::string &, ProtocolBase *) override
Returns the data about the next statement from the json file.
Definition: duktape_statement_reader.h:55
Definition: duktape_statement_reader.h:40
std::shared_ptr< MockServerGlobalScope > global_scope_
Definition: duktape_statement_reader.h:90
std::map< std::string, std::function< std::string()> > session_
Definition: duktape_statement_reader.h:89
std::string filename_
Definition: duktape_statement_reader.h:87
std::vector< std::string > module_prefixes_
Definition: duktape_statement_reader.h:88
DuktapeStatementReaderFactory(std::string filename, std::vector< std::string > module_prefixes, std::map< std::string, std::function< std::string()> > session, std::shared_ptr< MockServerGlobalScope > global_scope)
Definition: duktape_statement_reader.h:42
std::unique_ptr< StatementReaderBase > operator()()
Definition: duktape_statement_reader.cc:56
Definition: duktape_statement_reader.h:93
DuktapeStatementReader & operator=(const DuktapeStatementReader &)=delete
void handle_statement(const std::string &statement, ProtocolBase *protocol) override
handle the clients statement
Definition: duktape_statement_reader.cc:1015
DuktapeStatementReader(DuktapeStatementReader &&)
std::unique_ptr< Pimpl > pimpl_
Definition: duktape_statement_reader.h:134
stdx::expected< handshake_data, ErrorResponse > handshake() override
Definition: duktape_statement_reader.cc:937
stdx::expected< classic_protocol::message::server::Greeting, std::error_code > server_greeting(bool with_tls) override
Definition: duktape_statement_reader.cc:807
std::chrono::microseconds get_default_exec_time() override
Returns the default execution time in microseconds.
Definition: duktape_statement_reader.cc:1135
DuktapeStatementReader(std::string filename, std::vector< std::string > module_prefixes, std::map< std::string, std::function< std::string()> > session_data, std::shared_ptr< MockServerGlobalScope > shared_globals)
Definition: duktape_statement_reader.cc:783
void set_session_ssl_info(const SSL *ssl) override
Definition: duktape_statement_reader.cc:1238
HandshakeState
Definition: duktape_statement_reader.h:95
DuktapeStatementReader & operator=(DuktapeStatementReader &&)
std::vector< AsyncNotice > get_async_notices() override
Definition: duktape_statement_reader.cc:1139
DuktapeStatementReader(const DuktapeStatementReader &)=delete
std::chrono::microseconds server_greeting_exec_time() override
Definition: duktape_statement_reader.cc:894
~DuktapeStatementReader() override
Definition: duktape_statement_reader.cc:802
bool has_notices_
Definition: duktape_statement_reader.h:136
HandshakeState handshake_state_
Definition: duktape_statement_reader.h:138
Definition: statement_reader.h:81
Definition: statement_reader.h:367
Definition: expected.h:944
constexpr value_type ssl
Definition: classic_protocol_constants.h:49
std::error_code make_error_code(DynamicLoaderErrc ec)
make error_code from a DynamicLoaderErrc.
Definition: dynamic_loader.cc:79
Definition: mock_server_component.h:36
classic_protocol::message::server::Error ErrorResponse
Definition: statement_reader.h:70
Definition: gcs_xcom_synode.h:64
constexpr auto make_unexpected(E &&e) -> unexpected< std::decay_t< E > >
Definition: expected.h:125
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2892
const char * filename
Definition: pfs_example_component_population.cc:67
Definition: duktape_statement_reader.cc:445
Definition: mysqlslap.cc:217