CUBRID Engine  latest
cas_xa.c File Reference
#include "cas_common.h"
#include "cas.h"
#include "cas_net_buf.h"
#include "cas_network.h"
#include "cas_log.h"
#include "cas_function.h"
#include "cas_execute.h"
#include "cas_db_inc.h"
#include "xa.h"
Include dependency graph for cas_xa.c:

Go to the source code of this file.

Macros

#define CAS_SUPPORT_XA
 
#define MAX_GTRIDS   100
 

Functions

static int net_arg_get_xid (XID *xid, char *buf)
 
static void net_buf_cp_xid (T_NET_BUF *net_buf, XID *xid)
 
static int compare_xid (XID *xid1, XID *xid2)
 
FN_RETURN fn_xa_prepare (SOCKET sock_fd, int argc, void **argv, T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
FN_RETURN fn_xa_recover (SOCKET sock_fd, int argc, void **argv, T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
FN_RETURN fn_xa_end_tran (SOCKET sock_fd, int argc, void **argv, T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
bool is_xa_prepared (void)
 
void set_xa_prepare_flag (void)
 
void unset_xa_prepare_flag (void)
 

Variables

static bool xa_prepare_flag = false
 

Macro Definition Documentation

#define CAS_SUPPORT_XA

Definition at line 40 of file cas_xa.c.

#define MAX_GTRIDS   100

Definition at line 43 of file cas_xa.c.

Referenced by fn_xa_end_tran(), and fn_xa_recover().

Function Documentation

static int compare_xid ( XID xid1,
XID xid2 
)
static

Definition at line 260 of file cas_xa.c.

References xid_t::bqual_length, xid_t::data, xid_t::formatID, and xid_t::gtrid_length.

Referenced by fn_xa_end_tran().

Here is the caller graph for this function:

bool is_xa_prepared ( void  )

Definition at line 273 of file cas_xa.c.

References xa_prepare_flag.

Referenced by cas_main(), and shard_cas_main().

Here is the caller graph for this function:

static int net_arg_get_xid ( XID xid,
char *  buf 
)
static

Definition at line 218 of file cas_xa.c.

References xid_t::bqual_length, xid_t::data, xid_t::formatID, xid_t::gtrid_length, i, and ntohl().

Referenced by fn_xa_end_tran(), and fn_xa_prepare().

Here is the caller graph for this function:

static void net_buf_cp_xid ( T_NET_BUF net_buf,
XID xid 
)
static

Definition at line 250 of file cas_xa.c.

References xid_t::bqual_length, xid_t::data, xid_t::formatID, xid_t::gtrid_length, net_buf_cp_int(), net_buf_cp_str(), and NULL.

Referenced by fn_xa_recover().

Here is the caller graph for this function:

void set_xa_prepare_flag ( void  )

Definition at line 279 of file cas_xa.c.

References xa_prepare_flag.

Referenced by fn_xa_end_tran(), and fn_xa_prepare().

Here is the caller graph for this function:

void unset_xa_prepare_flag ( void  )

Definition at line 285 of file cas_xa.c.

References xa_prepare_flag.

Referenced by ux_end_tran().

Here is the caller graph for this function:

Variable Documentation

bool xa_prepare_flag = false
static

Definition at line 51 of file cas_xa.c.

Referenced by is_xa_prepared(), set_xa_prepare_flag(), and unset_xa_prepare_flag().