~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/named_savepoint.h

  • Committer: lbieber
  • Date: 2010-09-13 00:23:51 UTC
  • mfrom: (1759.1.2 build)
  • Revision ID: lbieber@orisndriz08-20100913002351-meze2278ypvpc6ta
Merge Joe - fix bug 600032 - Rollback to savepoint not handled correctly in transaction log
Merge Tim Martin - Adapted existing code documentation in decimal.cc into doxygen format

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
namespace drizzled
30
30
{
31
31
 
 
32
namespace message
 
33
{
 
34
class Transaction;
 
35
}
 
36
 
32
37
/**
33
38
 * This is a class which stores information about
34
39
 * a named savepoint in a transaction
41
46
   */
42
47
  NamedSavepoint(const char *in_name, size_t in_name_length) :
43
48
    name(in_name, in_name_length),
44
 
    resource_contexts()
 
49
    resource_contexts(),
 
50
    transaction_savepoint(NULL)
45
51
  {}
46
52
  ~NamedSavepoint()
47
53
  {}
66
72
  {
67
73
    return name;
68
74
  }
 
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
  }
69
83
  NamedSavepoint(const NamedSavepoint &other)
70
84
  {
71
85
    name.assign(other.getName());
72
86
    const TransactionContext::ResourceContexts &other_resource_contexts= other.getResourceContexts();
73
87
    resource_contexts.assign(other_resource_contexts.begin(),
74
88
                             other_resource_contexts.end());
 
89
    transaction_savepoint= other.getTransactionSavepoint();
75
90
  }
76
91
  NamedSavepoint &operator=(const NamedSavepoint &other)
77
92
  {
87
102
private:
88
103
  std::string name;
89
104
  TransactionContext::ResourceContexts resource_contexts;
 
105
  message::Transaction *transaction_savepoint;
90
106
  NamedSavepoint();
91
107
};
92
108