~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/named_savepoint.h

  • Committer: lbieber
  • Date: 2010-09-18 02:42:50 UTC
  • mfrom: (1774.1.1 build)
  • Revision ID: lbieber@orisndriz08-20100918024250-all17fhukrpaigqo
Merge Joe - Rework the rollback to savepoint code in terms of the transaction log

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
  NamedSavepoint(const char *in_name, size_t in_name_length) :
48
48
    name(in_name, in_name_length),
49
49
    resource_contexts(),
50
 
    transaction_savepoint(NULL)
51
 
  {}
52
 
  ~NamedSavepoint()
53
 
  {}
 
50
    transaction_message(NULL)
 
51
  {}
 
52
 
 
53
  ~NamedSavepoint();
 
54
 
 
55
  NamedSavepoint(const NamedSavepoint &other);
54
56
 
55
57
  void setResourceContexts(TransactionContext::ResourceContexts &new_contexts)
56
58
  {
72
74
  {
73
75
    return name;
74
76
  }
75
 
  message::Transaction *getTransactionSavepoint() const
76
 
  {
77
 
    return transaction_savepoint;
78
 
  }
79
 
  void setTransactionSavepoint(message::Transaction *in_transaction_savepoint)
80
 
  {
81
 
    transaction_savepoint= in_transaction_savepoint;
82
 
  }
83
 
  NamedSavepoint(const NamedSavepoint &other)
84
 
  {
85
 
    name.assign(other.getName());
86
 
    const TransactionContext::ResourceContexts &other_resource_contexts= other.getResourceContexts();
87
 
    resource_contexts.assign(other_resource_contexts.begin(),
88
 
                             other_resource_contexts.end());
89
 
    transaction_savepoint= other.getTransactionSavepoint();
 
77
  message::Transaction *getTransactionMessage() const
 
78
  {
 
79
    return transaction_message;
 
80
  }
 
81
  void setTransactionMessage(message::Transaction *in_transaction_message)
 
82
  {
 
83
    transaction_message= in_transaction_message;
90
84
  }
91
85
  NamedSavepoint &operator=(const NamedSavepoint &other)
92
86
  {
102
96
private:
103
97
  std::string name;
104
98
  TransactionContext::ResourceContexts resource_contexts;
105
 
  message::Transaction *transaction_savepoint;
 
99
  message::Transaction *transaction_message;
106
100
  NamedSavepoint();
107
101
};
108
102