Go to the source code of this file.
Data Structures | |
struct | xta_mysql_xa_resource_t |
Functions | |
int | xta_mysql_xa_close (xta_xa_resource_t *context, char *xa_info, int rmid, long flags) |
int | xta_mysql_xa_commit (xta_xa_resource_t *context, const XID *xid, int rmid, long flags) |
int | xta_mysql_xa_end (xta_xa_resource_t *context, const XID *xid, int rmid, long flags) |
int | xta_mysql_xa_forget (xta_xa_resource_t *context, const XID *xid, int rmid, long flags) |
int | xta_mysql_xa_open (xta_xa_resource_t *context, char *xa_info, int rmid, long flags) |
int | xta_mysql_xa_prepare (xta_xa_resource_t *context, const XID *xid, int rmid, long flags) |
int | xta_mysql_xa_recover (xta_xa_resource_t *context, XID *xids, long count, int rmid, long flags) |
void | xta_mysql_xa_resource_clean (xta_mysql_xa_resource_t *xa_resource) |
void | xta_mysql_xa_resource_delete (xta_mysql_xa_resource_t *xa_resource) |
int | xta_mysql_xa_resource_init (xta_mysql_xa_resource_t *xa_resource, MYSQL *connection, const char *name, const char *open_info) |
xta_mysql_xa_resource_t * | xta_mysql_xa_resource_new (MYSQL *connection, const char *name, const char *open_info) |
int | xta_mysql_xa_rollback (xta_xa_resource_t *context, const XID *xid, int rmid, long flags) |
int | xta_mysql_xa_start (xta_xa_resource_t *context, const XID *xid, int rmid, long flags) |
int xta_mysql_xa_close | ( | xta_xa_resource_t * | context, |
char * | xa_info, | ||
int | rmid, | ||
long | flags | ||
) |
Close a MySQL resource manager
[in,out] | context | : XTA resource context |
[in] | xa_info | : null-terminated character string that may contain instance-specific information for the resource manager |
[in] | rmid | : an integer assigned by the transaction manager, uniquely identifies the called resource manager instance within the thread of control |
[in] | flags | : TMNOFLAGS, future usage only |
Definition at line 265 of file xta_mysql_xa_resource.c.
References XA_OK, and XAER_RMERR.
int xta_mysql_xa_commit | ( | xta_xa_resource_t * | context, |
const XID * | xid, | ||
int | rmid, | ||
long | flags | ||
) |
Commit work done on behalf of a transaction branch
[in,out] | context | : XTA resource context |
[in] | xid | transaction identifier, XA spec |
[in] | rmid | : an integer assigned by the transaction manager, uniquely identifies the called resource manager instance within the thread of control |
[in] | flags | : TMONEPHASE or TMNOFLAGS |
Definition at line 444 of file xta_mysql_xa_resource.c.
References XAER_RMERR.
int xta_mysql_xa_end | ( | xta_xa_resource_t * | context, |
const XID * | xid, | ||
int | rmid, | ||
long | flags | ||
) |
End work performed on behalf of a transaction branch
[in,out] | context | XTA resource context |
[in] | xid | transaction identifier, XA spec |
[in] | rmid | an integer assigned by the transaction manager, uniquely identifies the called resource manager instance within the thread of control |
[in] | flags | only TMSUCCESS and TMFAIL can be passed to a MySQL resource |
Definition at line 338 of file xta_mysql_xa_resource.c.
References XAER_RMERR.
int xta_mysql_xa_forget | ( | xta_xa_resource_t * | context, |
const XID * | xid, | ||
int | rmid, | ||
long | flags | ||
) |
Forget about a heuristically completed transaction branch
[in,out] | context | : XTA resource context |
[in] | xid | transaction identifier, XA spec |
[in] | rmid | : an integer assigned by the transaction manager, uniquely identifies the called resource manager instance within the thread of control |
[in] | flags | : TMNOFLAGS, future usage only |
Definition at line 514 of file xta_mysql_xa_resource.c.
References XAER_RMERR.
int xta_mysql_xa_open | ( | xta_xa_resource_t * | context, |
char * | xa_info, | ||
int | rmid, | ||
long | flags | ||
) |
Open a MySQL resource manager
[in,out] | context | : XTA resource context |
[in] | xa_info | : null-terminated character string that may contain instance-specific information for the resource manager |
[in] | rmid | : an integer assigned by the transaction manager, uniquely identifies the called resource manager instance within the thread of control |
[in] | flags | : TMNOFLAGS, future usage only |
Definition at line 221 of file xta_mysql_xa_resource.c.
References xta_mysql_xa_resource_t::connection, xta_mysql_xa_resource_t::lssr, XA_OK, and XAER_RMERR.
int xta_mysql_xa_prepare | ( | xta_xa_resource_t * | context, |
const XID * | xid, | ||
int | rmid, | ||
long | flags | ||
) |
Prepare to commit work done on behalf of a transaction branch
[in,out] | context | : XTA resource context |
[in] | xid | transaction identifier, XA spec |
[in] | rmid | : an integer assigned by the transaction manager, uniquely identifies the called resource manager instance within the thread of control |
[in] | flags | : TMNOFLAGS, future usage only |
Definition at line 409 of file xta_mysql_xa_resource.c.
References XAER_RMERR.
int xta_mysql_xa_recover | ( | xta_xa_resource_t * | context, |
XID * | xids, | ||
long | count, | ||
int | rmid, | ||
long | flags | ||
) |
Obtain a list of prepared transaction branches from a resource manager
[in,out] | context | : XTA resource context |
[in] | xids | : an array into which the resource manager places XIDs for list of transaction branches that are currently in a prepared or heuristically completed state |
[in] | count | : the maximum number of XIDs that fit into that array |
[in] | rmid | : an integer assigned by the transaction manager, uniquely identifies the called resource manager instance within the thread of control |
[in] | flags | : TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS |
Definition at line 479 of file xta_mysql_xa_resource.c.
References XAER_RMERR.
void xta_mysql_xa_resource_clean | ( | xta_mysql_xa_resource_t * | xa_resource | ) |
Clean the properties of a MySQL XA Resource; this function must be called after xta_mysql_xa_resource_init during object deletion to avoid memory leaks
[in,out] | xa_resource | : MySQL XA Resource object |
Definition at line 191 of file xta_mysql_xa_resource.c.
References xta_xa_resource_s::act_rsrmgr_config, LIXA_RC_INTERNAL_ERROR, LIXA_RC_OK, xta_mysql_xa_resource_t::xa_resource, and xta_acquired_xa_resource_clean().
Referenced by xta_mysql_xa_resource_delete().
void xta_mysql_xa_resource_delete | ( | xta_mysql_xa_resource_t * | xa_resource | ) |
Delete an object that represent a MySQL XA Resource
[in] | xa_resource | : MySQL XA Resource |
Definition at line 112 of file xta_mysql_xa_resource.c.
References LIXA_RC_INTERNAL_ERROR, LIXA_RC_OK, and xta_mysql_xa_resource_clean().
int xta_mysql_xa_resource_init | ( | xta_mysql_xa_resource_t * | xa_resource, |
MYSQL * | connection, | ||
const char * | name, | ||
const char * | open_info | ||
) |
Initialize the propeties of a MySQL XA resource
[in,out] | xa_resource | : MySQL XA Resource object |
[in] | connection | : to MySQL already opened by the application program |
[in] | name | : unique identifier of the resource |
[in] | open_info | : unique description of the connection properties like network name/IP address, port, user/schema, etc. Only the first MAXINFOSIZE characters will be kept. |
Definition at line 141 of file xta_mysql_xa_resource.c.
References xta_xa_resource_s::act_rsrmgr_config, xta_mysql_xa_resource_t::connection, lixa_iface_set_xta(), LIXA_RC_INTERNAL_ERROR, LIXA_RC_NULL_OBJECT, LIXA_RC_OK, xta_mysql_xa_resource_t::lssr, xta_mysql_xa_resource_t::xa_resource, and xta_acquired_xa_resource_init().
Referenced by xta_mysql_xa_resource_new().
xta_mysql_xa_resource_t* xta_mysql_xa_resource_new | ( | MYSQL * | connection, |
const char * | name, | ||
const char * | open_info | ||
) |
Create a new object to represent a MySQL XA resource
[in] | connection | to MySQL already opened by the application program |
[in] | name | : unique identifier of the resource |
[in] | open_info | : unique description of the connection properties like network name/IP address, port, user/schema, etc. Only the first MAXINFOSIZE characters will be kept. |
Definition at line 69 of file xta_mysql_xa_resource.c.
References LIXA_RC_G_TRY_MALLOC_ERROR, LIXA_RC_INTERNAL_ERROR, LIXA_RC_OK, and xta_mysql_xa_resource_init().
int xta_mysql_xa_rollback | ( | xta_xa_resource_t * | context, |
const XID * | xid, | ||
int | rmid, | ||
long | flags | ||
) |
Roll back work done on behalf of a transaction branch
[in,out] | context | : XTA resource context |
[in] | xid | transaction identifier, XA spec |
[in] | rmid | : an integer assigned by the transaction manager, uniquely identifies the called resource manager instance within the thread of control |
[in] | flags | : TMNOFLAGS, future usage only |
Definition at line 374 of file xta_mysql_xa_resource.c.
References XAER_RMERR.
int xta_mysql_xa_start | ( | xta_xa_resource_t * | context, |
const XID * | xid, | ||
int | rmid, | ||
long | flags | ||
) |
Start work on behalf of a transaction branch
[in,out] | context | XTA resource context |
[in] | xid | transaction identifier, XA spec |
[in] | rmid | an integer assigned by the transaction manager, uniquely identifies the called resource manager instance within the thread of control |
[in] | flags | only TMNOFLAGS can be passed to a MySQL resource |
Definition at line 303 of file xta_mysql_xa_resource.c.
References XAER_RMERR.