~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/xid.h

  • Committer: Brian Aker
  • Date: 2011-02-13 01:25:00 UTC
  • mto: This revision was merged to the branch mainline in revision 2167.
  • Revision ID: brian@tangent.org-20110213012500-w094udxhtye5unik
Remove dependency from session of error handler

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
typedef uint64_t my_xid;
39
39
 
40
40
#define DRIZZLE_XIDDATASIZE 128
41
 
#define DRIZZLE_XID_PREFIX "MySQLXid"
 
41
#define DRIZZLE_XID_PREFIX "DrizzleXid"
42
42
#define DRIZZLE_XID_PREFIX_LEN 8 // must be a multiple of 8
43
43
#define DRIZZLE_XID_OFFSET (DRIZZLE_XID_PREFIX_LEN+sizeof(server_id))
44
44
#define DRIZZLE_XID_GTRID_LEN (DRIZZLE_XID_OFFSET+sizeof(my_xid))
75
75
};
76
76
 
77
77
/**
78
 
  struct st_drizzle_xid is binary compatible with the XID structure as
 
78
  struct st_DrizzleXid is binary compatible with the XID structure as
79
79
  in the X/Open CAE Specification, Distributed Transaction Processing:
80
80
  The XA Specification, X/Open Company Ltd., 1991.
81
81
  http://www.opengroup.org/bookstore/catalog/c193.htm
82
82
 
83
83
*/
84
84
 
85
 
class drizzle_xid {
 
85
class DrizzleXid {
86
86
public:
87
87
  long formatID;
88
88
  long gtrid_length;
89
89
  long bqual_length;
90
90
  char data[DRIZZLE_XIDDATASIZE];  /* Not \0-terminated */
91
91
 
92
 
  drizzle_xid() :
 
92
  DrizzleXid() :
93
93
    formatID(0),
94
94
    gtrid_length(0),
95
95
    bqual_length(0)
97
97
    memset(data, 0, DRIZZLE_XIDDATASIZE);
98
98
  }
99
99
};
100
 
typedef class drizzle_xid DRIZZLE_XID;
101
100
 
102
101
enum xa_states {XA_NOTR=0, XA_ACTIVE, XA_IDLE, XA_PREPARED};
103
102
extern const char *xa_state_names[];