CUBRID Engine  latest
transaction_sr.c File Reference
#include "config.h"
#include <assert.h>
#include "transaction_sr.h"
#include "locator_sr.h"
#include "log_2pc.h"
#include "log_lsa.hpp"
#include "log_manager.h"
#include "xserver_interface.h"
#include "server_support.h"
#include "dbtype.h"
#include "thread_manager.hpp"
Include dependency graph for transaction_sr.c:

Go to the source code of this file.

Functions

TRAN_STATE xtran_server_commit (THREAD_ENTRY *thread_p, bool retain_lock)
 
TRAN_STATE xtran_server_abort (THREAD_ENTRY *thread_p)
 
int xtran_server_start_topop (THREAD_ENTRY *thread_p, LOG_LSA *topop_lsa)
 
TRAN_STATE xtran_server_end_topop (THREAD_ENTRY *thread_p, LOG_RESULT_TOPOP result, LOG_LSA *topop_lsa)
 
int xtran_server_savepoint (THREAD_ENTRY *thread_p, const char *savept_name, LOG_LSA *savept_lsa)
 
TRAN_STATE xtran_server_partial_abort (THREAD_ENTRY *thread_p, const char *savept_name, LOG_LSA *savept_lsa)
 
int xtran_server_set_global_tran_info (THREAD_ENTRY *thread_p, int gtrid, void *info, int size)
 
int xtran_server_get_global_tran_info (THREAD_ENTRY *thread_p, int gtrid, void *buffer, int size)
 
int xtran_server_2pc_start (THREAD_ENTRY *thread_p)
 
TRAN_STATE xtran_server_2pc_prepare (THREAD_ENTRY *thread_p)
 
int xtran_server_2pc_recovery_prepared (THREAD_ENTRY *thread_p, int gtrids[], int size)
 
int xtran_server_2pc_attach_global_tran (THREAD_ENTRY *thread_p, int gtrid)
 
TRAN_STATE xtran_server_2pc_prepare_global_tran (THREAD_ENTRY *thread_p, int global_tranid)
 
bool xtran_is_blocked (THREAD_ENTRY *thread_p, int tran_index)
 
bool xtran_server_has_updated (THREAD_ENTRY *thread_p)
 
int xtran_wait_server_active_trans (THREAD_ENTRY *thread_p)
 
int xtran_server_is_active_and_has_updated (THREAD_ENTRY *thread_p)
 
int xtran_get_local_transaction_id (THREAD_ENTRY *thread_p, DB_VALUE *trid)
 
int xtran_lock_rep_read (THREAD_ENTRY *thread_p, LOCK lock_rr_tran)
 

Function Documentation

int xtran_get_local_transaction_id ( THREAD_ENTRY thread_p,
DB_VALUE trid 
)

Definition at line 665 of file transaction_sr.c.

References assert, db_make_int(), DB_TYPE_INTEGER, db_value_domain_init(), logtb_find_current_tranid(), NO_ERROR, and NULL.

Referenced by db_local_transaction_id(), sqp_get_server_info(), and stran_get_local_transaction_id().

Here is the caller graph for this function:

bool xtran_is_blocked ( THREAD_ENTRY thread_p,
int  tran_index 
)

Definition at line 559 of file transaction_sr.c.

References lock_is_waiting_transaction().

Referenced by stran_is_blocked(), and tran_is_blocked().

Here is the caller graph for this function:

int xtran_server_2pc_attach_global_tran ( THREAD_ENTRY thread_p,
int  gtrid 
)

Definition at line 512 of file transaction_sr.c.

References log_2pc_attach_global_tran().

Referenced by stran_server_2pc_attach_global_tran(), and tran_server_2pc_attach_global_tran().

Here is the caller graph for this function:

TRAN_STATE xtran_server_2pc_prepare ( THREAD_ENTRY thread_p)

Definition at line 466 of file transaction_sr.c.

References locator_drop_transient_class_name_entries(), log_2pc_prepare(), and NULL.

Referenced by stran_server_2pc_prepare(), and tran_server_2pc_prepare().

Here is the caller graph for this function:

TRAN_STATE xtran_server_2pc_prepare_global_tran ( THREAD_ENTRY thread_p,
int  global_tranid 
)

Definition at line 540 of file transaction_sr.c.

References locator_drop_transient_class_name_entries(), log_2pc_prepare_global_tran(), and NULL.

Referenced by stran_server_2pc_prepare_global_tran(), and tran_server_2pc_prepare_global_tran().

Here is the caller graph for this function:

int xtran_server_2pc_recovery_prepared ( THREAD_ENTRY thread_p,
int  gtrids[],
int  size 
)

Definition at line 490 of file transaction_sr.c.

References log_2pc_recovery_prepared().

Referenced by stran_server_2pc_recovery_prepared(), and tran_server_2pc_recovery_prepared().

Here is the caller graph for this function:

int xtran_server_2pc_start ( THREAD_ENTRY thread_p)

Definition at line 446 of file transaction_sr.c.

References log_2pc_start().

Referenced by stran_server_2pc_start(), and tran_server_2pc_start().

Here is the caller graph for this function:

int xtran_server_get_global_tran_info ( THREAD_ENTRY thread_p,
int  gtrid,
void *  buffer,
int  size 
)

Definition at line 426 of file transaction_sr.c.

References log_2pc_get_global_tran_info().

Referenced by stran_server_get_global_tran_info(), and tran_server_get_global_tran_info().

Here is the caller graph for this function:

bool xtran_server_has_updated ( THREAD_ENTRY thread_p)

Definition at line 575 of file transaction_sr.c.

References lock_has_xlock(), and logtb_has_updated().

Referenced by stran_server_has_updated(), tran_server_has_updated(), and xtran_server_is_active_and_has_updated().

Here is the caller graph for this function:

int xtran_server_is_active_and_has_updated ( THREAD_ENTRY thread_p)

Definition at line 650 of file transaction_sr.c.

References logtb_is_current_active(), and xtran_server_has_updated().

Referenced by stran_server_is_active_and_has_updated(), and tran_server_is_active_and_has_updated().

Here is the caller graph for this function:

TRAN_STATE xtran_server_partial_abort ( THREAD_ENTRY thread_p,
const char *  savept_name,
LOG_LSA savept_lsa 
)

Definition at line 379 of file transaction_sr.c.

References log_abort_partial().

Referenced by stran_server_partial_abort(), and tran_server_partial_abort().

Here is the caller graph for this function:

int xtran_server_savepoint ( THREAD_ENTRY thread_p,
const char *  savept_name,
LOG_LSA savept_lsa 
)

Definition at line 330 of file transaction_sr.c.

References ER_FAILED, locator_savepoint_transient_class_name_entries(), log_append_savepoint(), LSA_COPY(), LSA_SET_NULL(), NO_ERROR, and NULL.

Referenced by stran_server_savepoint(), and tran_server_savepoint().

Here is the caller graph for this function:

int xtran_server_set_global_tran_info ( THREAD_ENTRY thread_p,
int  gtrid,
void *  info,
int  size 
)

Definition at line 404 of file transaction_sr.c.

References log_2pc_set_global_tran_info().

Referenced by stran_server_set_global_tran_info(), and tran_server_set_global_tran_info().

Here is the caller graph for this function:

int xtran_wait_server_active_trans ( THREAD_ENTRY thread_p)