~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to drizzled/plugin/transactional_storage_engine.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include <drizzled/visibility.h>
28
28
 
29
 
namespace drizzled
30
 
{
31
 
 
32
 
namespace plugin
33
 
{
 
29
namespace drizzled {
 
30
namespace plugin {
34
31
 
35
32
/**
36
33
 * A type of storage engine which supports SQL transactions.
57
54
 * kill two_phase_commit member. Use an HTON flag if
58
55
 * absolutely needed to keep.
59
56
 */
60
 
class DRIZZLED_API TransactionalStorageEngine :public StorageEngine
 
57
class DRIZZLED_API TransactionalStorageEngine : public StorageEngine
61
58
{
62
59
  friend class SEAPITester;
63
60
public:
64
 
  TransactionalStorageEngine(const std::string name_arg,
 
61
  TransactionalStorageEngine(const std::string &name_arg,
65
62
                             const std::bitset<HTON_BIT_SIZE> &flags_arg= HTON_NO_FLAGS);
66
63
 
67
 
  virtual ~TransactionalStorageEngine();
68
 
 
69
64
  virtual int startTransaction(Session *session, start_transaction_option_t options)
70
65
  {
71
 
    TransactionServices &transaction_services= TransactionServices::singleton();
72
 
    transaction_services.registerResourceForTransaction(*session, this, this);
 
66
    TransactionServices::registerResourceForTransaction(*session, this, this);
73
67
    return doStartTransaction(session, options);
74
68
  }
75
69
 
76
70
  virtual void startStatement(Session *session)
77
71
  {
78
 
    TransactionServices &transaction_services= TransactionServices::singleton();
79
 
    transaction_services.registerResourceForStatement(*session, this, this);
 
72
    TransactionServices::registerResourceForStatement(*session, this, this);
80
73
    doStartStatement(session);
81
74
  }
82
75
 
130
123
  /**
131
124
   * @todo Kill this one entirely.  It's implementation, not interface...
132
125
   */
133
 
  static int releaseTemporaryLatches(Session *session);
 
126
  static void releaseTemporaryLatches(Session *session);
134
127
 
135
128
  /* Class Methods for operating on plugin */
136
129
  static bool addPlugin(plugin::TransactionalStorageEngine *engine);
216
209
   * and 'real commit' mean the same event.
217
210
   */
218
211
  virtual int doRollback(Session *session, bool normal_transaction)= 0;
219
 
  virtual int doReleaseTemporaryLatches(Session *session)
 
212
  virtual int doReleaseTemporaryLatches(Session*)
220
213
  {
221
 
    (void) session;
222
214
    return 0;
223
215
  }
224
 
  virtual int doStartConsistentSnapshot(Session *session)
 
216
  virtual int doStartConsistentSnapshot(Session*)
225
217
  {
226
 
    (void) session;
227
218
    return 0;
228
219
  }
229
220
};