MXS-1810: Create Trx class
The class encapsulates the relevant information of a transaction.
This commit is contained in:
@ -14,13 +14,12 @@
|
||||
|
||||
#include "readwritesplit.hh"
|
||||
#include "rwbackend.hh"
|
||||
#include "trx.hh"
|
||||
|
||||
#include <string>
|
||||
#include <deque>
|
||||
|
||||
#include <maxscale/buffer.hh>
|
||||
#include <maxscale/modutil.h>
|
||||
#include <maxscale/utils.hh>
|
||||
#include <maxscale/queryclassifier.hh>
|
||||
|
||||
#define TARGET_IS_MASTER(t) maxscale::QueryClassifier::target_is_master(t)
|
||||
@ -40,9 +39,6 @@ typedef std::list< std::pair<mxs::SRWBackend, uint8_t> > SlaveResponseList;
|
||||
/** Map of COM_STMT_EXECUTE targets by internal ID */
|
||||
typedef std::tr1::unordered_map<uint32_t, mxs::SRWBackend> ExecMap;
|
||||
|
||||
// A log of executed queries, for transaction replay
|
||||
typedef std::deque<mxs::Buffer> TrxLog;
|
||||
|
||||
/**
|
||||
* The client session of a RWSplit instance
|
||||
*/
|
||||
@ -141,8 +137,7 @@ public:
|
||||
mxs::QueryClassifier m_qc; /**< The query classifier. */
|
||||
uint64_t m_retry_duration; /**< Total time spent retrying queries */
|
||||
mxs::Buffer m_current_query; /**< Current query being executed */
|
||||
mxs::SHA1Checksum m_trx_checksum; /**< Transaction checksum */
|
||||
TrxLog m_trx_log; /**< Log of executed queries in the current transaction */
|
||||
Trx m_trx; /**< Current transaction */
|
||||
|
||||
private:
|
||||
RWSplitSession(RWSplit* instance, MXS_SESSION* session,
|
||||
|
||||
Reference in New Issue
Block a user