~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/named_savepoint.h

  • Committer: LinuxJedi
  • Date: 2010-09-09 06:14:45 UTC
  • mto: (1750.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1751.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100909061445-1jz91d5eed932616
Fix another wrong header, grr...

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
 
 
37
32
/**
38
33
 * This is a class which stores information about
39
34
 * a named savepoint in a transaction
46
41
   */
47
42
  NamedSavepoint(const char *in_name, size_t in_name_length) :
48
43
    name(in_name, in_name_length),
49
 
    resource_contexts(),
50
 
    transaction_message(NULL)
51
 
  {}
52
 
 
53
 
  ~NamedSavepoint();
54
 
 
55
 
  NamedSavepoint(const NamedSavepoint &other);
 
44
    resource_contexts()
 
45
  {}
 
46
  ~NamedSavepoint()
 
47
  {}
56
48
 
57
49
  void setResourceContexts(TransactionContext::ResourceContexts &new_contexts)
58
50
  {
74
66
  {
75
67
    return name;
76
68
  }
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;
 
69
  NamedSavepoint(const NamedSavepoint &other)
 
70
  {
 
71
    name.assign(other.getName());
 
72
    const TransactionContext::ResourceContexts &other_resource_contexts= other.getResourceContexts();
 
73
    resource_contexts.assign(other_resource_contexts.begin(),
 
74
                             other_resource_contexts.end());
84
75
  }
85
76
  NamedSavepoint &operator=(const NamedSavepoint &other)
86
77
  {
96
87
private:
97
88
  std::string name;
98
89
  TransactionContext::ResourceContexts resource_contexts;
99
 
  message::Transaction *transaction_message;
100
90
  NamedSavepoint();
101
91
};
102
92