CUBRID Engine  latest
transaction_cl.h File Reference
#include "config.h"
#include "error_manager.h"
#include "locator.h"
#include "storage_common.h"
#include "log_comm.h"
Include dependency graph for transaction_cl.h:

Go to the source code of this file.

Macros

#define TM_TRAN_INDEX()   (tm_Tran_index)
 
#define TM_TRAN_ISOLATION()   (tm_Tran_isolation)
 
#define TM_TRAN_ASYNC_WS()   (tm_Tran_async_ws)
 
#define TM_TRAN_WAIT_MSECS()   (tm_Tran_wait_msecs)
 
#define TM_TRAN_ID()   (tm_Tran_ID)
 
#define TM_TRAN_REP_READ_LOCK()   (tm_Tran_rep_read_lock)
 
#define TM_TRAN_READ_FETCH_VERSION()   (tm_Tran_read_fetch_instance_version)
 

Typedefs

typedef enum savepoint_type SAVEPOINT_TYPE
 

Enumerations

enum  savepoint_type { USER_SAVEPOINT = 1, SYSTEM_SAVEPOINT = 2 }
 

Functions

void tran_cache_tran_settings (int tran_index, int lock_timeout, TRAN_ISOLATION tran_isolation)
 
void tran_get_tran_settings (int *lock_timeout_in_msecs, TRAN_ISOLATION *tran_isolation, bool *async_ws)
 
int tran_reset_wait_times (int wait_in_msecs)
 
int tran_reset_isolation (TRAN_ISOLATION isolation, bool async_ws)
 
int tran_flush_to_commit (void)
 
int tran_commit (bool retain_lock)
 
int tran_abort (void)
 
int tran_unilaterally_abort (void)
 
int tran_abort_only_client (bool is_server_down)
 
bool tran_has_updated (void)
 
bool tran_is_active_and_has_updated (void)
 
int tran_set_global_tran_info (int gtrid, void *info, int size)
 
int tran_get_global_tran_info (int gtrid, void *buffer, int size)
 
int tran_2pc_start (void)
 
int tran_2pc_prepare (void)
 
int tran_2pc_recovery_prepared (int gtrids[], int size)
 
int tran_2pc_attach_global_tran (int gtrid)
 
int tran_2pc_prepare_global_tran (int gtrid)
 
void tran_free_savepoint_list (void)
 
int tran_system_savepoint (const char *savept_name)
 
int tran_savepoint_internal (const char *savept_name, SAVEPOINT_TYPE savepoint_type)
 
int tran_abort_upto_user_savepoint (const char *savepoint_name)
 
int tran_abort_upto_system_savepoint (const char *savepoint_name)
 
int tran_internal_abort_upto_savepoint (const char *savepoint_name, SAVEPOINT_TYPE savepoint_type, bool client_decache_only_insts)
 
void tran_set_query_timeout (int query_timeout)
 
int tran_get_query_timeout (void)
 
void tran_begin_libcas_function (void)
 
void tran_end_libcas_function (void)
 
bool tran_is_in_libcas (void)
 
bool tran_set_check_interrupt (bool flag)
 
bool tran_get_check_interrupt (void)
 
void tran_set_latest_query_status (int end_query_result, int tran_state, int should_conn_reset)
 
bool tran_was_latest_query_ended (void)
 
bool tran_was_latest_query_committed (void)
 
bool tran_was_latest_query_aborted (void)
 
bool tran_is_reset_required (void)
 
void tran_reset_latest_query_status (void)
 

Variables

int tm_Tran_index
 
TRAN_ISOLATION tm_Tran_isolation
 
bool tm_Tran_async_ws
 
int tm_Tran_wait_msecs
 
int tm_Tran_ID
 
bool tm_Tran_check_interrupt
 
bool tm_Use_OID_preflush
 
LOCK tm_Tran_rep_read_lock
 
LC_FETCH_VERSION_TYPE tm_Tran_read_fetch_instance_version
 
int tm_Tran_invalidate_snapshot
 

Macro Definition Documentation

#define TM_TRAN_ID ( )    (tm_Tran_ID)

Definition at line 45 of file transaction_cl.h.

#define TM_TRAN_INDEX ( )    (tm_Tran_index)

Definition at line 41 of file transaction_cl.h.

Referenced by er_log().

#define TM_TRAN_REP_READ_LOCK ( )    (tm_Tran_rep_read_lock)

Definition at line 46 of file transaction_cl.h.

Referenced by pt_class_pre_fetch().

Typedef Documentation

Enumeration Type Documentation

Enumerator
USER_SAVEPOINT 
SYSTEM_SAVEPOINT 

Definition at line 49 of file transaction_cl.h.

Function Documentation

int tran_2pc_attach_global_tran ( int  gtrid)

Definition at line 840 of file transaction_cl.c.

References assert, er_errid(), NO_ERROR, NULL_TRAN_INDEX, tm_Tran_index, and tran_server_2pc_attach_global_tran().

Referenced by db_2pc_attach_transaction().

Here is the caller graph for this function:

int tran_2pc_recovery_prepared ( int  gtrids[],
int  size 
)

Definition at line 819 of file transaction_cl.c.

References tran_server_2pc_recovery_prepared().

Referenced by db_2pc_prepared_transactions().

Here is the caller graph for this function:

int tran_2pc_start ( void  )

Definition at line 697 of file transaction_cl.c.

References tran_server_2pc_start().

Referenced by db_2pc_start_transaction().

Here is the caller graph for this function:

int tran_abort_upto_user_savepoint ( const char *  savepoint_name)

Definition at line 1161 of file transaction_cl.c.

References tran_free_list_upto_savepoint(), tran_internal_abort_upto_savepoint(), and USER_SAVEPOINT.

Referenced by db_abort_to_savepoint_internal().

Here is the caller graph for this function:

void tran_begin_libcas_function ( void  )

Definition at line 1315 of file transaction_cl.c.

References tm_Is_libcas.

Referenced by jsp_receive_response(), and jsp_send_destroy_request().

Here is the caller graph for this function:

void tran_cache_tran_settings ( int  tran_index,
int  lock_timeout,
TRAN_ISOLATION  tran_isolation 
)

Definition at line 121 of file transaction_cl.c.

References db_Connect_status, DB_CONNECTION_STATUS_NOT_CONNECTED, NULL_TRAN_INDEX, tm_Tran_index, tm_Tran_isolation, and tm_Tran_wait_msecs.

Referenced by boot_client(), and logpb_fatal_error_internal().

Here is the caller graph for this function:

void tran_end_libcas_function ( void  )

Definition at line 1325 of file transaction_cl.c.

References tm_Is_libcas.

Referenced by jsp_receive_response(), and jsp_send_destroy_request().

Here is the caller graph for this function:

int tran_flush_to_commit ( void  )
void tran_free_savepoint_list ( void  )

Definition at line 1007 of file transaction_cl.c.

References nlist_free(), and NULL.

Referenced by boot_client_all_finalize(), boot_initialize_client(), boot_restart_client(), tran_abort(), and tran_commit().

Here is the caller graph for this function:

bool tran_get_check_interrupt ( void  )

Definition at line 1361 of file transaction_cl.c.

References tm_Tran_check_interrupt.

Referenced by logtb_get_check_interrupt().

Here is the caller graph for this function:

int tran_get_global_tran_info ( int  gtrid,
void *  buffer,
int  size 
)

Definition at line 669 of file transaction_cl.c.

References assert, er_errid(), NO_ERROR, and tran_server_get_global_tran_info().

Referenced by db_get_global_transaction_info().

Here is the caller graph for this function:

int tran_get_query_timeout ( void  )

Definition at line 1290 of file transaction_cl.c.

References tm_Query_begin, tm_Query_timeout, and tran_current_timemillis().

Referenced by execute_query(), and prepare_and_execute_query().

Here is the caller graph for this function:

void tran_get_tran_settings ( int *  lock_timeout_in_msecs,
TRAN_ISOLATION tran_isolation,
bool async_ws 
)

Definition at line 148 of file transaction_cl.c.

References TM_TRAN_ASYNC_WS, TM_TRAN_ISOLATION, and TM_TRAN_WAIT_MSECS.

Referenced by ci_conn_get_option_impl(), db_get_tran_settings(), do_get_xaction(), set_iso_level(), and ux_get_tran_setting().

Here is the caller graph for this function:

bool tran_has_updated ( void  )

Definition at line 603 of file transaction_cl.c.

References tran_server_has_updated(), and ws_has_updated().

Referenced by db_commit_is_needed(), and tran_internal_abort_upto_savepoint().

Here is the caller graph for this function:

bool tran_is_active_and_has_updated ( void  )

Definition at line 618 of file transaction_cl.c.

References tran_server_is_active_and_has_updated(), and ws_has_updated().

Referenced by boot_shutdown_client().

Here is the caller graph for this function:

bool tran_is_in_libcas ( void  )

Definition at line 1335 of file transaction_cl.c.

References tm_Is_libcas.

bool tran_is_reset_required ( void  )

Definition at line 1467 of file transaction_cl.c.

References RESET_REQUIRED, and tm_Tran_latest_query_status.

Referenced by tran_commit().

Here is the caller graph for this function:

int tran_reset_isolation ( TRAN_ISOLATION  isolation,
bool  async_ws 
)
void tran_reset_latest_query_status ( void  )

Definition at line 1427 of file transaction_cl.c.

References NONE, and tm_Tran_latest_query_status.

Referenced by db_reset_latest_query_status(), tran_abort(), tran_commit(), and tran_set_latest_query_status().

Here is the caller graph for this function:

int tran_savepoint_internal ( const char *  savept_name,
SAVEPOINT_TYPE  savepoint_type 
)
bool tran_set_check_interrupt ( bool  flag)

Definition at line 1346 of file transaction_cl.c.

References tm_Tran_check_interrupt.

Referenced by logtb_set_check_interrupt().

Here is the caller graph for this function:

int tran_set_global_tran_info ( int  gtrid,
void *  info,
int  size 
)

Definition at line 639 of file transaction_cl.c.

References assert, er_errid(), NO_ERROR, and tran_server_set_global_tran_info().

Referenced by db_set_global_transaction_info().

Here is the caller graph for this function:

void tran_set_latest_query_status ( int  end_query_result,
int  tran_state,
int  should_conn_reset 
)
void tran_set_query_timeout ( int  query_timeout)
bool tran_was_latest_query_aborted ( void  )

Definition at line 1457 of file transaction_cl.c.

References ABORTED, and tm_Tran_latest_query_status.

Referenced by do_commit_after_execute(), do_execute_statement(), do_statement(), tran_abort(), tran_commit(), and ux_auto_commit().

Here is the caller graph for this function:

bool tran_was_latest_query_ended ( void  )

Definition at line 1437 of file transaction_cl.c.

References QUERY_ENDED, and tm_Tran_latest_query_status.

Referenced by db_query_end(), do_execute_merge(), do_merge(), pt_end_query(), tran_abort(), and tran_commit().

Here is the caller graph for this function:

Variable Documentation

bool tm_Tran_async_ws

Definition at line 68 of file transaction_cl.c.

Referenced by tran_reset_isolation().

bool tm_Tran_check_interrupt

Definition at line 70 of file transaction_cl.c.

Referenced by tran_get_check_interrupt(), and tran_set_check_interrupt().

int tm_Tran_ID

Definition at line 71 of file transaction_cl.c.

TRAN_ISOLATION tm_Tran_isolation

Definition at line 67 of file transaction_cl.c.

Referenced by tran_cache_tran_settings(), and tran_reset_isolation().

LC_FETCH_VERSION_TYPE tm_Tran_read_fetch_instance_version

Definition at line 78 of file transaction_cl.c.

Referenced by db_set_read_fetch_instance_version().

int tm_Tran_wait_msecs

Definition at line 69 of file transaction_cl.c.

Referenced by tran_cache_tran_settings(), and tran_reset_wait_times().

bool tm_Use_OID_preflush

Definition at line 226 of file transaction_cl.c.

Referenced by do_execute_select(), ldr_init_loader(), and tran_flush_to_commit().