77
76
* This method properly sets the is_active member variable.
79
78
void evaluateActivePlugins();
80
* Helper method which returns the active Transaction message
81
* for the supplied Session. If one is not found, a new Transaction
82
* message is allocated, initialized, and returned.
84
* @param The session processing the transaction
86
drizzled::message::Transaction *getActiveTransaction(Session *in_session) const;
81
88
* Helper method which attaches a transaction context
82
* the supplied command based on the supplied Session's
83
* transaction information.
85
void setCommandTransactionContext(drizzled::message::Command &in_command, Session *in_session) const;
89
* the supplied transaction based on the supplied Session's
90
* transaction information. This method also ensure the
91
* transaction message is attached properly to the Session object
93
* @param The transaction message to initialize
94
* @param The Session processing this transaction
96
void initTransaction(drizzled::message::Transaction &in_command, Session *in_session) const;
98
* Helper method which finalizes data members for the
99
* supplied transaction's context.
101
* @param The transaction message to finalize
102
* @param The Session processing this transaction
104
void finalizeTransaction(drizzled::message::Transaction &in_command, Session *in_session) const;
106
* Helper method which deletes transaction memory and
107
* unsets Session's transaction and statement messages.
109
void cleanupTransaction(message::Transaction *in_transaction,
110
Session *in_session) const;
112
* Helper method which initializes a Statement message
114
* @param The statement to initialize
115
* @param The type of the statement
116
* @param The session processing this statement
118
void initStatement(drizzled::message::Statement &statement,
119
drizzled::message::Statement::Type in_type,
120
Session *in_session) const;
122
* Helper method which finalizes a Statement message
124
* @param The statement to initialize
125
* @param The session processing this statement
127
void finalizeStatement(drizzled::message::Statement &statement,
128
Session *in_session) const;
130
* Helper method which returns an initialized Statement
131
* message for methods doing insertion of data.
133
* @param[in] Pointer to the Session doing the processing
134
* @param[in] Pointer to the Table object being inserted into
136
message::Statement &getInsertStatement(Session *in_session,
137
Table *in_table) const;
140
* Helper method which initializes the header message for
143
* @param[inout] Statement message container to modify
144
* @param[in] Pointer to the Session doing the processing
145
* @param[in] Pointer to the Table being inserted into
147
void setInsertHeader(message::Statement &statement,
149
Table *in_table) const;
151
* Helper method which returns an initialized Statement
152
* message for methods doing updates of data.
154
* @param[in] Pointer to the Session doing the processing
155
* @param[in] Pointer to the Table object being updated
156
* @param[in] Pointer to the old data in the record
157
* @param[in] Pointer to the new data in the record
159
message::Statement &getUpdateStatement(Session *in_session,
161
const unsigned char *old_record,
162
const unsigned char *new_record) const;
164
* Helper method which initializes the header message for
167
* @param[inout] Statement message container to modify
168
* @param[in] Pointer to the Session doing the processing
169
* @param[in] Pointer to the Table being updated
170
* @param[in] Pointer to the old data in the record
171
* @param[in] Pointer to the new data in the record
173
void setUpdateHeader(message::Statement &statement,
176
const unsigned char *old_record,
177
const unsigned char *new_record) const;
179
* Helper method which returns an initialized Statement
180
* message for methods doing deletion of data.
182
* @param[in] Pointer to the Session doing the processing
183
* @param[in] Pointer to the Table object being deleted from
185
message::Statement &getDeleteStatement(Session *in_session,
186
Table *in_table) const;
189
* Helper method which initializes the header message for
192
* @param[inout] Statement message container to modify
193
* @param[in] Pointer to the Session doing the processing
194
* @param[in] Pointer to the Table being deleted from
196
void setDeleteHeader(message::Statement &statement,
198
Table *in_table) const;
87
200
* Helper method which pushes a constructed message out
88
201
* to the registered replicator and applier plugins.
90
203
* @param Message to push out
92
void push(drizzled::message::Command &to_push);
205
void push(drizzled::message::Transaction &to_push);
119
232
* @param Pointer to a replicator to attach/register
121
void attachReplicator(drizzled::plugin::CommandReplicator *in_replicator);
234
void attachReplicator(drizzled::plugin::TransactionReplicator *in_replicator);
123
236
* Detaches/unregisters a replicator with our internal
124
237
* collection of replicators.
126
239
* @param Pointer to the replicator to detach
128
void detachReplicator(drizzled::plugin::CommandReplicator *in_replicator);
241
void detachReplicator(drizzled::plugin::TransactionReplicator *in_replicator);
130
243
* Attaches a applier to our internal collection of
133
246
* @param Pointer to a applier to attach/register
135
void attachApplier(drizzled::plugin::CommandApplier *in_applier);
248
void attachApplier(drizzled::plugin::TransactionApplier *in_applier);
137
250
* Detaches/unregisters a applier with our internal
138
251
* collection of appliers.
140
253
* @param Pointer to the applier to detach
142
void detachApplier(drizzled::plugin::CommandApplier *in_applier);
255
void detachApplier(drizzled::plugin::TransactionApplier *in_applier);
144
* Creates a new StartTransaction GPB message and pushes
257
* Creates a new Transaction GPB message and attaches the message
258
* to the supplied session object.
262
* This method is called when a "normal" transaction -- i.e. an
263
* explicitly-started transaction from a client -- is started with
264
* BEGIN or START TRANSACTION.
147
266
* @param Pointer to the Session starting the transaction
149
void startTransaction(Session *in_session);
268
void startNormalTransaction(Session *in_session);
151
* Creates a new CommitTransaction GPB message and pushes
270
* Commits a normal transaction (see above) and pushes the
271
* transaction message out to the replicators.
154
273
* @param Pointer to the Session committing the transaction
156
void commitTransaction(Session *in_session);
275
void commitNormalTransaction(Session *in_session);
158
* Creates a new RollbackTransaction GPB message and pushes
277
* Marks the current active transaction message as being rolled
278
* back and pushes the transaction message out to replicators.
161
280
* @param Pointer to the Session committing the transaction