1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-27 09:01:50 +03:00

Refactored dbms simulator. Survives SST.

This commit is contained in:
Teemu Ollakka
2018-06-15 16:25:27 +03:00
parent b3f60b7be1
commit ae68122d59
13 changed files with 370 additions and 74 deletions

View File

@ -10,10 +10,12 @@
namespace db
{
class client;
class client_context : public wsrep::client_context
{
public:
client_context(wsrep::mutex& mutex,
db::client* client,
db::server_context& server_context,
wsrep::client_service& client_service,
const wsrep::client_id& client_id,
@ -23,14 +25,20 @@ namespace db
client_service,
client_id,
mode)
, client_(client)
, is_autocommit_(false)
, do_2pc_(false)
{ }
db::client* client() { return client_; }
void reset_globals() { }
void store_globals() { }
bool is_autocommit() const { return is_autocommit_; }
bool do_2pc() const { return do_2pc_; }
private:
client_context(const client_context&);
client_context& operator=(const client_context&);
db::client* client_;
bool is_autocommit_;
bool do_2pc_;
};