CUBRID Engine
latest
|
#include <sys/time.h>
#include "porting.h"
#include "boot.h"
#include "error_manager.h"
#include "storage_common.h"
#include "transaction_cl.h"
Go to the source code of this file.
Macros | |
#define | BOOT_IS_CLIENT_RESTARTED() (tm_Tran_index != NULL_TRAN_INDEX) |
Functions | |
int | boot_initialize_client (BOOT_CLIENT_CREDENTIAL *client_credential, BOOT_DB_PATH_INFO *db_path_info, bool db_overwrite, const char *file_addmore_vols, DKNPAGES npages, PGLENGTH db_desired_pagesize, DKNPAGES log_npages, PGLENGTH db_desired_log_page_size, const char *lang_charset) |
int | boot_restart_client (BOOT_CLIENT_CREDENTIAL *client_credential) |
int | boot_shutdown_client (bool iserfinal) |
void | boot_donot_shutdown_client_at_exit (void) |
void | boot_server_die_or_changed (void) |
void | boot_client_all_finalize (bool iserfinal) |
char * | boot_get_host_name (void) |
void | boot_clear_host_connected (void) |
char * | boot_get_server_session_key (void) |
void | boot_set_server_session_key (const char *key) |
int | boot_add_collations (MOP class_mop) |
Variables | |
VOLID | boot_User_volid |
#define BOOT_IS_CLIENT_RESTARTED | ( | ) | (tm_Tran_index != NULL_TRAN_INDEX) |
Definition at line 42 of file boot_cl.h.
Referenced by au_login(), boot_client_all_finalize(), boot_donot_shutdown_client_at_exit(), boot_initialize_client(), boot_restart_client(), boot_server_die_or_changed(), boot_shutdown_client(), boot_shutdown_client_at_exit(), locator_mflush_force(), locator_remove_class(), locator_repl_mflush_force(), tran_2pc_prepare(), tran_2pc_prepare_global_tran(), tran_abort(), tran_abort_only_client(), and tran_commit().
int boot_add_collations | ( | MOP | class_mop | ) |
Definition at line 3661 of file boot_cl.c.
References assert, lang_collation::built_in, coll_data::checksum, lang_collation::codeset, lang_collation::coll, coll_data::coll_id, coll_data::coll_name, coll_data::count_contr, CT_DBCOLL_BUILT_IN_COLUMN, CT_DBCOLL_CHARSET_ID_COLUMN, CT_DBCOLL_CHECKSUM_COLUMN, CT_DBCOLL_COLL_ID_COLUMN, CT_DBCOLL_COLL_NAME_COLUMN, CT_DBCOLL_CONTRACTIONS_COLUMN, CT_DBCOLL_EXPANSIONS_COLUMN, CT_DBCOLL_UCA_STRENGTH, db_create_internal(), db_make_int(), db_make_varchar(), db_put_internal(), er_errid(), i, LANG_COLL_DEFAULT, lang_collation_count(), lang_get_collation(), LANG_MAX_COLLATIONS, LANG_SYS_CODESET, LANG_SYS_COLLATION, NO_ERROR, NULL, uca_options::sett_expansions, uca_options::sett_strength, strlen, and coll_data::uca_opt.
Referenced by boot_define_collations(), and synccoll_force().
void boot_clear_host_connected | ( | void | ) |
Definition at line 5717 of file boot_cl.c.
Referenced by db_clear_host_connected().
void boot_client_all_finalize | ( | bool | iserfinal | ) |
Definition at line 1536 of file boot_cl.c.
References area_final(), ARG_FILE_LINE, assert, au_final(), BOOT_CHECK_HA_DELAY_CAP, boot_client(), boot_Is_client_all_final, BOOT_IS_CLIENT_RESTARTED, cfg_get_hosts(), cnv_cleanup(), co_final(), css_check_server_alive_fn, css_terminate(), CUB_MAXHOSTNAMELEN, db_clear_delayed_hosts_count(), DB_CONNECT_ORDER_RANDOM, boot_server_credential::db_full_name, db_get_delayed_hosts_count(), db_get_max_num_delayed_hosts_lookup(), DB_HS_CONN_FAILURE, DB_HS_CONN_TIMEOUT, DB_HS_UNUSABLE_DATABASES, boot_server_credential::db_lang, db_private_free_and_init, db_set_connected_host_status(), db_set_host_status(), dl_destroy_module(), ER_ALL_FINAL, ER_BO_CONNECT_FAILED, er_clear(), ER_CSS_CLIENTS_EXCEEDED, ER_ERROR_SEVERITY, er_final(), ER_GENERIC_ERROR, er_log_debug, ER_NET_CANT_CONNECT_SERVER, ER_NET_DIFFERENT_RELEASE, ER_NET_HS_UNKNOWN_SERVER_REL, ER_NET_NO_MASTER, ER_NET_NO_SERVER_HOST, ER_NET_SERVER_HAND_SHAKE, er_set(), ER_WARNING_SEVERITY, ERR_CSS_ERROR_FROM_SERVER, ERR_CSS_TCP_CANNOT_CONNECT_TO_MASTER, ERR_CSS_TCP_CONNECT_TIMEDOUT, error(), es_final(), boot_server_credential::host_name, database_info::hosts, lang_final(), boot_server_credential::lob_path, locator_free_areas(), MAX_NUM_DB_HOSTS, msgcat_final(), database_info::name, net_client_init(), net_client_ping_server_with_handshake(), NO_ERROR, NULL, NULL_TRAN_INDEX, database_info::num_hosts, parser_final(), perfmon_finalize(), boot_server_credential::server_session_key, SERVER_SESSION_KEY_SIZE, set_final(), showstmt_metadata_final(), sm_final(), sm_flush_static_methods(), strncpy_bufsize, sysprm_final(), tp_final(), tr_final(), TRAN_DEFAULT_ISOLATION_LEVEL, tran_free_savepoint_list(), TRAN_LOCK_INFINITE_WAIT, tz_unload(), util_shuffle_string_array(), and ws_final().
Referenced by boot_initialize_client(), boot_restart_client(), and boot_shutdown_client().
void boot_donot_shutdown_client_at_exit | ( | void | ) |
Definition at line 1485 of file boot_cl.c.
References BOOT_IS_CLIENT_RESTARTED, and boot_Process_id.
Referenced by logpb_fatal_error_internal().
char* boot_get_host_name | ( | void | ) |
Definition at line 5725 of file boot_cl.c.
References basename_r(), boot_Client_id_unknown_string, boot_get_server_locales(), boot_Host_name, CUB_MAXHOSTNAMELEN, DB_MAX_IDENTIFIER_LENGTH, free_and_init, boot_client_credential::get_db_name(), clientids::get_program_name(), GETHOSTNAME, lang_check_coll_compat(), lang_check_locale_compat(), NO_ERROR, and NULL.
Referenced by boot_initialize_client(), boot_restart_client(), and db_find_or_create_session().
char* boot_get_server_session_key | ( | void | ) |
Definition at line 5792 of file boot_cl.c.
References boot_server_credential::server_session_key.
Referenced by db_get_server_session_key().
int boot_initialize_client | ( | BOOT_CLIENT_CREDENTIAL * | client_credential, |
BOOT_DB_PATH_INFO * | db_path_info, | ||
bool | db_overwrite, | ||
const char * | file_addmore_vols, | ||
DKNPAGES | npages, | ||
PGLENGTH | db_desired_pagesize, | ||
DKNPAGES | log_npages, | ||
PGLENGTH | db_desired_log_page_size, | ||
const char * | lang_charset | ||
) |
Definition at line 290 of file boot_cl.c.
References area_final(), area_init(), ARG_FILE_LINE, assert, ASSERT_ERROR, au_final(), au_init(), au_install(), au_start(), au_user_name_dup(), boot_client(), boot_client_all_finalize(), boot_Client_id_buffer, boot_Client_id_unknown_string, boot_Client_no_user_string, boot_Db_host_buf, boot_Db_path_buf, BOOT_FORMAT_MAX_LENGTH, boot_get_host_name(), boot_initialize_server(), boot_Is_client_all_final, BOOT_IS_CLIENT_RESTARTED, boot_Lob_path_buf, boot_Log_path_buf, BOOT_NO_OPT_CAP, boot_shutdown_client(), boot_User_volid, boot_Volume_label, catcls_class_install(), catcls_vclass_install(), cfg_free_directory(), cfg_new_db(), clientids::client_type, COMPOSE_FULL_NAME(), CUB_MAXHOSTNAMELEN, DB_CONNECT_ORDER_SEQ, db_find_or_create_session(), boot_server_credential::db_full_name, boot_db_path_info::db_host, boot_client_credential::db_name, boot_db_path_info::db_path, db_private_free_and_init, db_set_page_size(), clientids::db_user, dl_destroy_module(), dl_initiate_module(), ER_BO_CANNOT_ACCESS_MESSAGE_CATALOG, ER_BO_CANT_LOAD_SYSPRM, ER_BO_CWD_FAIL, ER_BO_FULL_DATABASE_NAME_IS_TOO_LONG, ER_BO_UNABLE_TO_FIND_HOSTNAME, ER_BO_UNKNOWN_DATABASE, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_ES_INVALID_PATH, ER_GENERIC_ERROR, ER_LOC_INIT, er_log_debug, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), er_set_with_oserror(), es_final(), es_get_type(), ES_NONE, ES_OWFS, free_and_init, boot_client_credential::get_db_name(), clientids::get_db_user(), clientids::get_program_name(), GETHOSTNAME, getuserid(), clientids::host_name, boot_server_credential::host_name, intl_identifier_upper(), intl_identifier_upper_string_size(), L_cuserid, lang_final(), lang_init(), lang_set_charset_lang(), boot_db_path_info::lob_path, LOB_PATH_DEFAULT_PREFIX, locator_free_areas(), locator_initialize_areas(), boot_db_path_info::log_path, clientids::login_name, MAX_NTRANS, MSGCAT_CATALOG_CUBRID, MSGCAT_GENERAL_DATABASE_INIT, msgcat_init(), msgcat_message(), MSGCAT_SET_GENERAL, NO_ERROR, NULL, NULL_TRAN_INDEX, OID_INIT_TEMPID, oid_set_root(), PATH_SEPARATOR, perfmon_finalize(), perfmon_initialize(), prm_get_integer_value(), PRM_ID_LK_TIMEOUT_SECS, PRM_ID_LOG_ISOLATION_LEVEL, rel_name(), boot_server_credential::server_session_key, SERVER_SESSION_KEY_SIZE, set_final(), showstmt_metadata_final(), sm_create_root(), sm_final(), sm_mark_system_classes(), strlen, strncpy_bufsize, sysprm_final(), sysprm_load_and_init_client(), tm_Tran_index, tp_final(), tp_init(), tr_final(), tr_init(), tr_install(), tran_commit(), tran_free_savepoint_list(), tsc_init(), tz_unload(), ws_final(), and ws_init().
Referenced by db_init().
int boot_restart_client | ( | BOOT_CLIENT_CREDENTIAL * | client_credential | ) |
Definition at line 738 of file boot_cl.c.
References area_final(), area_init(), ARG_FILE_LINE, assert, ASSERT_ERROR, assert_release, au_final(), au_has_user_name(), au_init(), AU_PUBLIC_USER_NAME, au_start(), au_user_name(), BOOT_ADMIN_CLIENT_TYPE, BOOT_BROKER_AND_DEFAULT_CLIENT_TYPE, BOOT_CHECK_HA_DELAY_CAP, boot_client(), boot_client_all_finalize(), boot_client_find_and_cache_class_oids(), boot_Client_id_buffer, boot_Client_id_unknown_string, BOOT_CSQL_CLIENT_TYPE, boot_get_host_name(), boot_Is_client_all_final, BOOT_IS_CLIENT_RESTARTED, BOOT_IS_PREFERRED_HOSTS_SET, BOOT_LOG_REPLICATOR_TYPE, BOOT_NO_OPT_CAP, BOOT_NORMAL_CLIENT_TYPE, BOOT_READ_ONLY_CLIENT_TYPE, boot_register_client(), BOOT_REPLICA_ONLY_BROKER_CLIENT_TYPE, boot_shutdown_client(), cfg_find_db(), cfg_free_directory(), cfg_free_hosts(), cfg_get_hosts(), cfg_new_db(), clientids::client_type, boot_client_credential::connect_order, css_windows_startup(), boot_server_credential::db_charset, db_clear_host_status(), DB_CLIENT_TYPE_SLAVE_ONLY_BROKER, DB_CONNECT_ORDER_SEQ, db_disable_modification(), db_find_or_create_session(), boot_server_credential::db_full_name, DB_HS_NON_PREFFERED_HOSTS, boot_server_credential::db_lang, boot_client_credential::db_password, db_private_free_and_init, db_set_host_status(), db_set_page_size(), clientids::db_user, boot_server_credential::disk_compatibility, dl_destroy_module(), dl_initiate_module(), ER_BO_CANNOT_ACCESS_MESSAGE_CATALOG, ER_BO_CANT_LOAD_SYSPRM, ER_BO_CONNECTED_TO, ER_BO_UNKNOWN_DATABASE, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_ES_NO_LOB_PATH, ER_GENERIC_ERROR, er_init(), ER_LOC_INIT, er_log_debug, ER_NET_NO_EXPLICIT_SERVER_HOST, ER_NET_SERVER_HAND_SHAKE, ER_NOT_IN_STANDALONE, ER_NOTIFICATION_SEVERITY, er_set(), ER_TZ_LOAD_ERROR, ER_WARNING_SEVERITY, error(), es_final(), es_init(), boot_client_credential::get_db_name(), boot_client_credential::get_db_password(), clientids::get_db_user(), clientids::get_host_name(), clientids::get_login_name(), clientids::get_program_name(), getuserid(), clientids::host_name, boot_server_credential::host_name, i, jsp_init(), L_cuserid, lang_final(), lang_init(), lang_set_charset(), lang_set_language(), boot_server_credential::lob_path, locator_free_areas(), locator_initialize_areas(), boot_server_credential::log_page_size, clientids::login_name, msgcat_init(), database_info::name, column::name, NO_ERROR, NULL, NULL_TRAN_INDEX, database_info::num_hosts, OID_INIT_TEMPID, oid_set_root(), boot_server_credential::page_size, perfmon_initialize(), pr_Enable_string_compression, boot_client_credential::preferred_hosts, prm_get_bool_value(), prm_get_integer_value(), prm_get_string_value(), PRM_ID_ENABLE_STRING_COMPRESSION, PRM_ID_ER_EXIT_ASK, PRM_ID_ER_LOG_FILE, PRM_ID_LK_TIMEOUT_SECS, PRM_ID_LOG_ISOLATION_LEVEL, PRM_ID_READ_ONLY_MODE, PRM_ID_TCP_PORT_ID, clientids::process_id, rel_disk_compatible(), rel_set_disk_compatible(), boot_server_credential::root_class_hfid, boot_server_credential::root_class_oid, boot_server_credential::server_session_key, SERVER_SESSION_KEY_SIZE, set_final(), showstmt_metadata_final(), showstmt_metadata_init(), sm_final(), sm_init(), sysprm_final(), sysprm_init_intl_param(), sysprm_load_and_init_client(), sysprm_tune_client_parameters(), TM_TRAN_ASYNC_WS, tm_Tran_index, tp_final(), tp_init(), tr_final(), tr_init(), tran_commit(), TRAN_DEFAULT_ISOLATION_LEVEL, tran_free_savepoint_list(), TRAN_LOCK_INFINITE_WAIT, tran_reset_isolation(), tran_reset_wait_times(), tsc_init(), tz_load(), tz_unload(), util_free_string_array(), util_split_string(), ws_final(), ws_free_string(), and ws_init().
Referenced by conn_restart_client(), and db_restart().
void boot_server_die_or_changed | ( | void | ) |
Definition at line 1503 of file boot_cl.c.
References ARG_FILE_LINE, boot_client(), boot_Is_client_all_final, BOOT_IS_CLIENT_RESTARTED, css_terminate(), er_print_callstack(), NULL_TRAN_INDEX, prm_get_bool_value(), PRM_ID_TEST_MODE, TM_TRAN_ISOLATION, TM_TRAN_WAIT_MSECS, and tran_abort_only_client().
Referenced by set_server_error().
void boot_set_server_session_key | ( | const char * | key | ) |
Definition at line 5801 of file boot_cl.c.
References assert, basename_r(), boot_get_server_timezone_checksum(), check_timezone_compat(), DB_MAX_IDENTIFIER_LENGTH, boot_client_credential::get_db_name(), clientids::get_program_name(), NO_ERROR, NULL, boot_server_credential::server_session_key, SERVER_SESSION_KEY_SIZE, TZ_CHECKSUM_SIZE, and tz_get_data().
Referenced by db_set_server_session_key().
int boot_shutdown_client | ( | bool | iserfinal | ) |
Definition at line 1396 of file boot_cl.c.
References boot_client_all_finalize(), BOOT_IS_CLIENT_RESTARTED, boot_unregister_client(), css_windows_shutdown(), jsp_close_connection(), net_client_final(), NO_ERROR, prm_get_bool_value(), PRM_ID_COMMIT_ON_SHUTDOWN, tm_Tran_index, tran_abort(), tran_commit(), tran_is_active_and_has_updated(), and tran_wait_server_active_trans().
Referenced by boot_initialize_client(), boot_restart_client(), boot_shutdown_client_at_exit(), ci_conn_close_impl(), and db_shutdown().
VOLID boot_User_volid |
Definition at line 153 of file boot_cl.c.
Referenced by allocate_index(), boot_initialize_client(), and classobj_make_class().