~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/xid.h

  • Committer: Brian Aker
  • Date: 2009-03-17 06:05:42 UTC
  • mfrom: (934.2.17 small-cleanups)
  • Revision ID: brian@tangent.org-20090317060542-a7ggj7l686cvxw31
Merge Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
};
81
81
typedef struct st_drizzle_xid DRIZZLE_XID;
82
82
 
 
83
enum xa_states {XA_NOTR=0, XA_ACTIVE, XA_IDLE, XA_PREPARED};
 
84
extern const char *xa_state_names[];
83
85
 
84
86
/* for recover() handlerton call */
85
87
#define MIN_XID_LIST_SIZE  128
86
88
#define MAX_XID_LIST_SIZE  (1024*128)
87
89
 
 
90
typedef struct st_xid_state {
 
91
  /* For now, this is only used to catch duplicated external xids */
 
92
  XID  xid;                           // transaction identifier
 
93
  enum xa_states xa_state;            // used by external XA only
 
94
  bool in_session;
 
95
} XID_STATE;
 
96
 
 
97
bool xid_cache_init(void);
 
98
void xid_cache_free(void);
 
99
XID_STATE *xid_cache_search(XID *xid);
 
100
bool xid_cache_insert(XID *xid, enum xa_states xa_state);
 
101
bool xid_cache_insert(XID_STATE *xid_state);
 
102
void xid_cache_delete(XID_STATE *xid_state);
 
103
 
88
104
#endif /* DRIZZLED_XID_H */