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.");
75 std::unique_ptr<StatementReaderBase>
operator()();
89 std::string
filename, std::vector<std::string> module_prefixes,
90 std::map<std::string, std::function<std::string()>> session_data,
91 std::shared_ptr<MockServerGlobalScope> shared_globals);
116 bool with_tls)
override;
Definition: duktape_statement_reader.h:51
std::vector< AsyncNotice > get_async_notices() override
Definition: duktape_statement_reader.h:62
stdx::expected< handshake_data, ErrorResponse > handshake(bool) override
Definition: duktape_statement_reader.h:64
std::string what_
Definition: duktape_statement_reader.h:72
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:69
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:81
std::map< std::string, std::function< std::string()> > session_
Definition: duktape_statement_reader.h:80
std::string filename_
Definition: duktape_statement_reader.h:78
std::vector< std::string > module_prefixes_
Definition: duktape_statement_reader.h:79
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:129
Definition: duktape_statement_reader.h:84
DuktapeStatementReader & operator=(const DuktapeStatementReader &)=delete
stdx::expected< handshake_data, ErrorResponse > handshake(bool with_tls) override
Definition: duktape_statement_reader.cc:1075
void handle_statement(const std::string &statement, ProtocolBase *protocol) override
handle the clients statement
Definition: duktape_statement_reader.cc:1190
DuktapeStatementReader(DuktapeStatementReader &&)
std::unique_ptr< Pimpl > pimpl_
Definition: duktape_statement_reader.h:126
std::chrono::microseconds server_greeting_exec_time()
Definition: duktape_statement_reader.cc:1048
std::chrono::microseconds get_default_exec_time() override
Returns the default execution time in microseconds.
Definition: duktape_statement_reader.cc:1310
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:951
void set_session_ssl_info(const SSL *ssl) override
Definition: duktape_statement_reader.cc:1413
stdx::expected< classic_protocol::message::server::Greeting, std::error_code > server_greeting()
Definition: duktape_statement_reader.cc:1023
HandshakeState
Definition: duktape_statement_reader.h:86
DuktapeStatementReader & operator=(DuktapeStatementReader &&)
std::vector< AsyncNotice > get_async_notices() override
Definition: duktape_statement_reader.cc:1314
DuktapeStatementReader(const DuktapeStatementReader &)=delete
~DuktapeStatementReader() override
Definition: duktape_statement_reader.cc:970
bool has_notices_
Definition: duktape_statement_reader.h:128
HandshakeState handshake_state_
Definition: duktape_statement_reader.h:130
Definition: statement_reader.h:96
Definition: statement_reader.h:374
Definition: expected.h:284
constexpr value_type ssl
Definition: classic_protocol_constants.h:49
Definition: mock_server_component.h:36
classic_protocol::message::server::Error ErrorResponse
Definition: statement_reader.h:85
Definition: gcs_xcom_synode.h:64
unexpected(E) -> unexpected< E >
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:518
Definition: mysqlslap.cc:219