CUBRID Engine
latest
|
#include "config.h"
#include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <assert.h>
#include "boot_sr.h"
#include "area_alloc.h"
#include "btree.h"
#include "chartype.h"
#include "dbtran_def.h"
#include "error_manager.h"
#include "system_parameter.h"
#include "object_primitive.h"
#include "locator_sr.h"
#include "heap_file.h"
#include "system_catalog.h"
#include "transform.h"
#include "databases_file.h"
#include "language_support.h"
#include "message_catalog.h"
#include "perf_monitor.h"
#include "porting_inline.hpp"
#include "set_object.h"
#include "util_func.h"
#include "intl_support.h"
#include "serial.h"
#include "server_interface.h"
#include "jansson.h"
#include "jsp_sr.h"
#include "xserver_interface.h"
#include "session.h"
#include "event_log.h"
#include "tz_support.h"
#include "filter_pred_cache.h"
#include "scan_manager.h"
#include "slotted_page.h"
#include "thread_manager.hpp"
#include "double_write_buffer.h"
#include "xasl_cache.h"
#include "log_volids.hpp"
#include "vacuum.h"
#include "tde.h"
#include "porting.h"
#include "tcp.h"
Go to the source code of this file.
Classes | |
struct | boot_dbparm |
Macros | |
#define | BOOT_LEAVE_SAFE_OSDISK_PARTITION_FREE_SPACE (1250 * (IO_DEFAULT_PAGE_SIZE / IO_PAGESIZE)) /* 5 Mbytes */ |
#define | BOOT_FORMAT_MAX_LENGTH 500 |
#define | BOOTSR_MAX_LINE 500 |
Typedefs | |
typedef struct boot_dbparm | BOOT_DB_PARM |
typedef enum remove_temp_vol_action | REMOVE_TEMP_VOL_ACTION |
Enumerations | |
enum | remove_temp_vol_action { REMOVE_TEMP_VOL_DEFAULT_ACTION, ONLY_PHYSICAL_REMOVE_TEMP_VOL_ACTION } |
enum | { CHECK_ONLY = 0, REPAIR_ALL = 1 } |
Functions | |
int | catcls_compile_catalog_classes (THREAD_ENTRY *thread_p) |
int | catcls_finalize_class_oid_to_oid_hash_table (THREAD_ENTRY *thread_p) |
int | catcls_get_server_compat_info (THREAD_ENTRY *thread_p, INTL_CODESET *charset_id_p, char *lang_buf, const int lang_buf_size, char *timezone_checksum) |
int | catcls_get_db_collation (THREAD_ENTRY *thread_p, LANG_COLL_COMPAT **db_collations, int *coll_cnt) |
int | catcls_find_and_set_cached_class_oid (THREAD_ENTRY *thread_p) |
static int | boot_get_db_parm (THREAD_ENTRY *thread_p, BOOT_DB_PARM *dbparm, OID *dbparm_oid) |
static int | boot_remove_temp_volume (THREAD_ENTRY *thread_p, VOLID volid, const char *vlabel) |
static int | boot_remove_all_temp_volumes (THREAD_ENTRY *thread_p, REMOVE_TEMP_VOL_ACTION delete_action) |
static int | boot_xremove_temp_volume (THREAD_ENTRY *thread_p, VOLID volid, const char *vlabel) |
static void | boot_make_temp_volume_fullname (char *temp_vol_fullname, VOLID temp_volid) |
static void | boot_remove_unknown_temp_volumes (THREAD_ENTRY *thread_p) |
static int | boot_parse_add_volume_extensions (THREAD_ENTRY *thread_p, const char *filename_addmore_vols) |
static int | boot_find_rest_volumes (THREAD_ENTRY *thread_p, BO_RESTART_ARG *r_args, VOLID volid, int(*fun)(THREAD_ENTRY *thread_p, VOLID xvolid, const char *vlabel, void *args), void *args) |
static int | boot_find_rest_permanent_volumes (THREAD_ENTRY *thread_p, bool newvolpath, bool use_volinfo, VOLID volid, int(*fun)(THREAD_ENTRY *thread_p, VOLID xvolid, const char *vlabel, void *args), void *args) |
static void | boot_find_rest_temp_volumes (THREAD_ENTRY *thread_p, VOLID volid, int(*fun)(THREAD_ENTRY *thread_p, VOLID xvolid, const char *vlabel), bool forward_dir, bool check_before_access) |
static int | boot_check_permanent_volumes (THREAD_ENTRY *thread_p) |
static int | boot_mount (THREAD_ENTRY *thread_p, VOLID volid, const char *vlabel, void *ignore_arg) |
static char * | boot_find_new_db_path (char *db_pathbuf, const char *fileof_vols_and_wherepaths) |
static int | boot_create_all_volumes (THREAD_ENTRY *thread_p, const BOOT_CLIENT_CREDENTIAL *client_credential, const char *db_comments, DKNPAGES db_npages, const char *file_addmore_vols, const char *log_path, const char *log_prefix, DKNPAGES log_npages, int client_lock_wait, TRAN_ISOLATION client_isolation) |
static int | boot_remove_all_volumes (THREAD_ENTRY *thread_p, const char *db_fullname, const char *log_path, const char *log_prefix, bool dirty_rem, bool force_delete) |
static char * | boot_volume_info_log_path (char *log_path) |
static void | boot_remove_useless_path_separator (const char *path, char *new_path) |
static void | boot_ctrl_c_in_init_server (int ignore_signo) |
static INTL_CODESET | boot_get_db_charset_from_header (THREAD_ENTRY *thread_p, const char *log_path, const char *log_prefix) |
STATIC_INLINE int | boot_db_parm_update_heap (THREAD_ENTRY *thread_p) __attribute__((ALWAYS_INLINE)) |
static int | boot_after_copydb (THREAD_ENTRY *thread_p) |
static int | boot_generate_tde_keys (THREAD_ENTRY *thread_p) |
void | boot_server_status (BOOT_SERVER_STATUS status) |
int | boot_find_root_heap (HFID *root_hfid_p) |
int | xboot_find_number_permanent_volumes (THREAD_ENTRY *thread_p) |
int | xboot_find_number_temp_volumes (THREAD_ENTRY *thread_p) |
VOLID | xboot_find_last_permanent (THREAD_ENTRY *thread_p) |
VOLID | xboot_peek_last_permanent (THREAD_ENTRY *thread_p) |
VOLID | xboot_find_last_temp (THREAD_ENTRY *thread_p) |
VOLID | boot_find_next_permanent_volid (THREAD_ENTRY *thread_p) |
int | boot_reset_db_parm (THREAD_ENTRY *thread_p) |
const char * | boot_db_name (void) |
const char * | boot_db_full_name () |
const char * | boot_get_lob_path (void) |
VOLID | xboot_add_volume_extension (THREAD_ENTRY *thread_p, DBDEF_VOL_EXT_INFO *ext_info) |
int | xboot_initialize_server (const BOOT_CLIENT_CREDENTIAL *client_credential, BOOT_DB_PATH_INFO *db_path_info, bool db_overwrite, const char *file_addmore_vols, volatile DKNPAGES db_npages, PGLENGTH db_desired_pagesize, volatile DKNPAGES log_npages, PGLENGTH db_desired_log_page_size, OID *rootclass_oid, HFID *rootclass_hfid, int client_lock_wait, TRAN_ISOLATION client_isolation) |
static int | boot_make_session_server_key (void) |
int | boot_restart_server (THREAD_ENTRY *thread_p, bool print_restart, const char *db_name, bool from_backup, CHECK_ARGS *check_coll_and_timezone, BO_RESTART_ARG *r_args, bool skip_vacuum) |
int | xboot_restart_from_backup (THREAD_ENTRY *thread_p, int print_restart, const char *db_name, BO_RESTART_ARG *r_args) |
int | boot_reset_mk_after_restart_from_backup (THREAD_ENTRY *thread_p, BO_RESTART_ARG *r_args) |
bool | xboot_shutdown_server (REFPTR(THREAD_ENTRY, thread_p), ER_FINAL_CODE is_er_final) |
const char * | xboot_get_server_session_key (void) |
int | xboot_register_client (THREAD_ENTRY *thread_p, BOOT_CLIENT_CREDENTIAL *client_credential, int client_lock_wait, TRAN_ISOLATION client_isolation, TRAN_STATE *tran_state, BOOT_SERVER_CREDENTIAL *server_credential) |
int | xboot_unregister_client (REFPTR(THREAD_ENTRY, thread_p), int tran_index) |
DISK_ISVALID | xboot_checkdb_table (THREAD_ENTRY *thread_p, int check_flag, OID *oid, BTID *index_btid) |
int | xboot_check_db_consistency (THREAD_ENTRY *thread_p, int check_flag, OID *oids, int num_oids, BTID *index_btid) |
void | boot_server_all_finalize (THREAD_ENTRY *thread_p, ER_FINAL_CODE is_er_final, BOOT_SERVER_SHUTDOWN_MODE shutdown_common_modules) |
int | xboot_backup (THREAD_ENTRY *thread_p, const char *backup_path, FILEIO_BACKUP_LEVEL backup_level, bool delete_unneeded_logarchives, const char *backup_verbose_file, int num_threads, FILEIO_ZIP_METHOD zip_method, FILEIO_ZIP_LEVEL zip_level, int skip_activelog, int sleep_msecs, bool separate_keys) |
int | xboot_copy (REFPTR(THREAD_ENTRY, thread_p), const char *from_dbname, const char *new_db_name, const char *new_db_path, const char *new_log_path, const char *new_lob_path, const char *new_db_server_host, const char *new_volext_path, const char *fileof_vols_and_copypaths, bool new_db_overwrite) |
int | xboot_soft_rename (THREAD_ENTRY *thread_p, const char *old_db_name, const char *new_db_name, const char *new_db_path, const char *new_log_path, const char *new_db_server_host, const char *new_volext_path, const char *fileof_vols_and_renamepaths, bool new_db_overwrite, bool extern_rename, bool force_delete) |
int | xboot_delete (const char *db_name, bool force_delete, BOOT_SERVER_SHUTDOWN_MODE shutdown_common_modules) |
int | xboot_emergency_patch (const char *db_name, bool recreate_log, DKNPAGES log_npages, const char *db_locale, FILE *out_fp) |
int | xboot_compact_db (THREAD_ENTRY *thread_p, OID *class_oids, int n_classes, int space_to_process, int instance_lock_timeout, int class_lock_timeout, bool delete_old_repr, OID *last_processed_class_oid, OID *last_processed_oid, int *total_objects, int *failed_objects, int *modified_objects, int *big_objects, int *initial_last_repr_id) |
int | xboot_heap_compact (THREAD_ENTRY *thread_p, OID *class_oid) |
int | xboot_compact_start (THREAD_ENTRY *thread_p) |
int | xboot_compact_stop (THREAD_ENTRY *thread_p) |
bool | boot_set_skip_check_ct_classes (bool val) |
const char * | boot_client_type_to_string (BOOT_CLIENT_TYPE type) |
int | boot_get_new_volume_name_and_id (THREAD_ENTRY *thread_p, DB_VOLTYPE voltype, const char *given_path, const char *given_name, char *fullname_newvol_out, VOLID *volid_newvol_out) |
int | boot_dbparm_save_volume (THREAD_ENTRY *thread_p, DB_VOLTYPE voltype, VOLID volid) |
Variables | |
bool | catcls_Enable |
BOOT_SERVER_STATUS | boot_Server_status = BOOT_SERVER_DOWN |
static char | boot_Db_full_name [PATH_MAX] |
static OID | boot_Header_oid |
static BOOT_DB_PARM | boot_Struct_db_parm |
static BOOT_DB_PARM * | boot_Db_parm = &boot_Struct_db_parm |
static OID * | boot_Db_parm_oid = &boot_Header_oid |
static char | boot_Lob_path [PATH_MAX+LOB_PATH_PREFIX_MAX] = "" |
static bool | skip_to_check_ct_classes_for_rebuild = false |
static char | boot_Server_session_key [SERVER_SESSION_KEY_SIZE] |
static jmp_buf | boot_Init_server_jmpbuf |
static bool | boot_Init_server_is_canceled = false |
#define BOOT_FORMAT_MAX_LENGTH 500 |
Definition at line 104 of file boot_sr.c.
Referenced by boot_restart_server(), and xboot_initialize_server().
#define BOOT_LEAVE_SAFE_OSDISK_PARTITION_FREE_SPACE (1250 * (IO_DEFAULT_PAGE_SIZE / IO_PAGESIZE)) /* 5 Mbytes */ |
#define BOOTSR_MAX_LINE 500 |
Definition at line 105 of file boot_sr.c.
Referenced by boot_parse_add_volume_extensions().
typedef struct boot_dbparm BOOT_DB_PARM |
typedef enum remove_temp_vol_action REMOVE_TEMP_VOL_ACTION |
|
static |
Definition at line 6175 of file boot_sr.c.
References ARG_FILE_LINE, ASSERT_ERROR, er_log_debug, log_global::hdr, log_Gl, logpb_force_flush_header_and_pages(), NO_ERROR, vacuum_reset_data_after_copydb(), and log_header::was_copied.
Referenced by boot_restart_server().
|
static |
Definition at line 1270 of file boot_sr.c.
References ARG_FILE_LINE, boot_Db_full_name, disk_get_link(), ER_BO_INCONSISTENT_NPERM_VOLUMES, ER_BO_NOT_A_VOLUME, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), ER_SYNTAX_ERROR_SEVERITY, ER_WARNING_SEVERITY, fileio_get_volume_label(), LOG_DBFIRST_VOLID, NO_ERROR, NULL, NULL_VOLID, boot_dbparm::nvols, PEEK, and util_compare_filepath().
Referenced by xboot_check_db_consistency().
const char* boot_client_type_to_string | ( | BOOT_CLIENT_TYPE | type | ) |
Definition at line 5950 of file boot_sr.c.
References DB_CLIENT_TYPE_ADMIN_CSQL, DB_CLIENT_TYPE_ADMIN_CSQL_WOS, DB_CLIENT_TYPE_ADMIN_UTILITY, DB_CLIENT_TYPE_BROKER, DB_CLIENT_TYPE_CSQL, DB_CLIENT_TYPE_DEFAULT, DB_CLIENT_TYPE_LOG_APPLIER, DB_CLIENT_TYPE_LOG_COPIER, DB_CLIENT_TYPE_READ_ONLY_BROKER, DB_CLIENT_TYPE_READ_ONLY_CSQL, DB_CLIENT_TYPE_RO_BROKER_REPLICA_ONLY, DB_CLIENT_TYPE_RW_BROKER_REPLICA_ONLY, DB_CLIENT_TYPE_SKIP_VACUUM_ADMIN_CSQL, DB_CLIENT_TYPE_SKIP_VACUUM_CSQL, DB_CLIENT_TYPE_SLAVE_ONLY_BROKER, DB_CLIENT_TYPE_SO_BROKER_REPLICA_ONLY, DB_CLIENT_TYPE_SYSTEM_INTERNAL, and DB_CLIENT_TYPE_UNKNOWN.
Referenced by logtb_descriptors_start_scan().
|
static |
Definition at line 4902 of file boot_sr.c.
References recdes::area_size, assert, ASSERT_ERROR, assert_release, boot_Db_full_name, boot_db_parm_update_heap(), boot_parse_add_volume_extensions(), boot_server_all_finalize(), boot_server_status(), BOOT_SERVER_UP, BOOT_SHUTDOWN_EXCEPT_COMMON_MODULES, catalog_create(), catalog_initialize(), boot_dbparm::classname_table, dbdef_vol_ext_info::comments, COPY_OID, boot_dbparm::ctid, recdes::data, DB_PERMANENT_DATA_PURPOSE, DB_SIZEOF, DB_TYPE_STRING, disk_format_first_volume(), disk_set_boot_hfid(), boot_dbparm::dropped_files_vfid, dwb_create(), er_stack_pop(), er_stack_push(), ER_THREAD_FINAL, error(), dbdef_vol_ext_info::extend_npages, FILE_HEAP, file_tracker_create(), vfid::fileid, fileio_synchronize_all(), heap_assign_address(), heap_cache_class_info(), heap_create_insert_context(), heap_insert_logical(), heap_manager_initialize(), boot_dbparm::hfid, boot_dbparm::last_volid, recdes::length, locator_initialize(), log_create(), LOG_DBFIRST_VOLID, log_final(), log_initialize(), logpb_add_volume(), logpb_checkpoint(), logpb_delete(), logpb_force_flush_pages(), logtb_assign_tran_index(), logtb_initialize_global_unique_stats_table(), logtb_release_tran_index(), dbdef_vol_ext_info::max_npages, dbdef_vol_ext_info::max_writesize_in_sec, dbdef_vol_ext_info::name, NO_ERROR, NULL, NULL_FILEID, NULL_TRAN_INDEX, NULL_TRANID, NULL_VOLID, boot_dbparm::nvols, OID_SET_NULL, oid_set_root(), pgbuf_flush_all(), prm_get_integer_value(), PRM_ID_VACUUM_LOG_BLOCK_PAGES, dbdef_vol_ext_info::purpose, qmgr_initialize(), boot_dbparm::query_vfid, REC_HOME, heap_operation_context::res_oid, boot_dbparm::rootclass_hfid, ROOTCLASS_NAME, boot_dbparm::rootclass_name, boot_dbparm::rootclass_oid, spage_boot(), tde_initialize(), boot_dbparm::tde_keyinfo_hfid, boot_dbparm::temp_last_volid, boot_dbparm::temp_nvols, tf_install_meta_classes(), TRAN_ACTIVE, boot_dbparm::trk_vfid, recdes::type, vacuum_create_file_for_dropped_files(), vacuum_create_file_for_vacuum_data(), boot_dbparm::vacuum_data_vfid, boot_dbparm::vacuum_log_block_npages, ctid::vfid, hfid::vfid, ehid::vfid, VFID_SET_NULL, vfid::volid, xehash_create(), xheap_create(), and ctid::xhid.
Referenced by xboot_initialize_server().
|
static |
Definition at line 1390 of file boot_sr.c.
Referenced by xboot_initialize_server().
const char* boot_db_full_name | ( | void | ) |
Definition at line 470 of file boot_sr.c.
References boot_Db_full_name.
Referenced by boot_reset_mk_after_restart_from_backup(), disk_add_volume(), dwb_create_internal(), dwb_load_and_recover_pages(), logpb_copy_database(), logpb_rename_all_volumes_files(), logpb_restore(), stde_get_mk_file_path(), tde_cipher_initialize(), tde_copy_keys_file(), tde_create_keys_file(), tde_get_mk_file_path(), tde_initialize(), and xtde_change_mk_without_flock().
const char* boot_db_name | ( | void | ) |
Definition at line 459 of file boot_sr.c.
References boot_Db_full_name, and fileio_get_base_file_name().
Referenced by css_register_server_timeout_fn(), er_file_backup(), jsp_server_port(), logpb_backup(), logpb_restore(), and sboot_change_ha_mode().
STATIC_INLINE int boot_db_parm_update_heap | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 6132 of file boot_sr.c.
References recdes::area_size, ASSERT_ERROR, heap_scancache_node::class_oid, recdes::data, heap_create_update_context(), heap_scancache_end(), heap_scancache_start_modify(), heap_update_logical(), boot_dbparm::hfid, recdes::length, NO_ERROR, heap_scancache::node, NULL, oid_Root_class_oid, boot_dbparm::rootclass_oid, SINGLE_ROW_UPDATE, and UPDATE_INPLACE_CURRENT_MVCCID.
Referenced by boot_create_all_volumes(), boot_dbparm_save_volume(), and boot_remove_all_temp_volumes().
int boot_dbparm_save_volume | ( | THREAD_ENTRY * | thread_p, |
DB_VOLTYPE | voltype, | ||
VOLID | volid | ||
) |
Definition at line 6069 of file boot_sr.c.
References assert, ASSERT_ERROR, assert_release, boot_Db_parm, boot_db_parm_update_heap(), DB_PERMANENT_VOLTYPE, ER_FAILED, fileio_get_volume_descriptor(), FILEIO_SYNC_ALSO_FLUSH_DWB, fileio_synchronize(), heap_flush(), boot_dbparm::last_volid, log_append_undo_data2(), log_check_system_op_is_started(), LOG_MAX_DBVOLID, NO_ERROR, NULL, boot_dbparm::nvols, RVPGBUF_FLUSH_PAGE, STATIC_INLINE, boot_dbparm::temp_last_volid, boot_dbparm::temp_nvols, db_identifier::volid, and VPID_GET_FROM_OID.
Referenced by disk_add_volume().
|
static |
Definition at line 5682 of file boot_sr.c.
References ARG_FILE_LINE, boot_Db_full_name, ER_BO_CWD_FAIL, ER_ERROR_SEVERITY, ER_LOG_USER_FILE_UNKNOWN, ER_LOG_USER_FILE_UNORDERED_ENTRIES, er_set(), er_set_with_oserror(), LOG_DBFIRST_VOLID, NULL, and PATH_SEPARATOR.
Referenced by xboot_copy(), and xboot_soft_rename().
VOLID boot_find_next_permanent_volid | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 425 of file boot_sr.c.
References disk_lock_extend(), disk_unlock_extend(), and boot_dbparm::last_volid.
Referenced by log_recovery_notpartof_volumes().
|
static |
Definition at line 1076 of file boot_sr.c.
References ARG_FILE_LINE, boot_Db_full_name, disk_get_link(), ER_BO_INCONSISTENT_NPERM_VOLUMES, ER_FAILED, er_set(), ER_SYNTAX_ERROR_SEVERITY, boot_dbparm::last_volid, LOG_DBFIRST_VOLID, logpb_recreate_volume_info(), logpb_scan_volume_info(), NO_ERROR, NULL, NULL_VOLID, and boot_dbparm::nvols.
Referenced by boot_find_rest_volumes().
|
static |
Definition at line 1165 of file boot_sr.c.
References boot_Db_full_name, fileio_get_base_file_name(), fileio_get_directory_path(), fileio_is_volume_exist(), fileio_make_volume_temp_name(), free_and_init, LOG_MAX_DBVOLID, NULL, prm_get_string_value(), PRM_ID_IO_TEMP_VOLUME_PATH, strlen, boot_dbparm::temp_last_volid, and boot_dbparm::temp_nvols.
Referenced by boot_remove_all_temp_volumes().
|
static |
Definition at line 1034 of file boot_sr.c.
References boot_find_rest_permanent_volumes(), bo_restart_arg::newvolpath, NO_ERROR, and NULL.
Referenced by boot_remove_all_volumes(), boot_restart_server(), and xboot_emergency_patch().
int boot_find_root_heap | ( | HFID * | root_hfid_p | ) |
Definition at line 325 of file boot_sr.c.
References assert, HFID_COPY, HFID_IS_NULL, NO_ERROR, NULL, and boot_dbparm::rootclass_hfid.
Referenced by catalog_check_consistency(), catalog_dump(), heap_hfid_cache_get(), heap_scancache_quick_start_root_hfid(), locator_check_all_entries_of_all_btrees(), locator_check_by_class_oid(), locator_check_class_names(), locator_initialize(), pgbuf_get_groupid_and_unfix(), xboot_initialize_server(), xboot_register_client(), and xstats_update_all_statistics().
|
static |
|
static |
Definition at line 5918 of file boot_sr.c.
References assert, boot_Db_full_name, disk_get_boot_db_charset(), INTL_CODESET_ERROR, LOG_DBFIRST_VOLID, log_get_charset_from_header_page(), and NO_ERROR.
Referenced by boot_restart_server(), and xboot_emergency_patch().
|
static |
Definition at line 295 of file boot_sr.c.
References recdes::area_size, assert, COPY, recdes::data, DB_SIZEOF, ER_FAILED, heap_first(), heap_scancache_end(), heap_scancache_quick_start_with_class_hfid(), boot_dbparm::hfid, recdes::length, NO_ERROR, NULL, and S_SUCCESS.
Referenced by boot_remove_all_volumes(), boot_reset_db_parm(), boot_restart_server(), and xboot_emergency_patch().
const char* boot_get_lob_path | ( | void | ) |
Definition at line 479 of file boot_sr.c.
References boot_Lob_path.
Referenced by catcls_vclass_install(), copydb(), spacedb(), and xboot_soft_rename().
int boot_get_new_volume_name_and_id | ( | THREAD_ENTRY * | thread_p, |
DB_VOLTYPE | voltype, | ||
const char * | given_path, | ||
const char * | given_name, | ||
char * | fullname_newvol_out, | ||
VOLID * | volid_newvol_out | ||
) |
Definition at line 5995 of file boot_sr.c.
References ARG_FILE_LINE, assert, boot_Db_full_name, DB_PERMANENT_VOLTYPE, ER_BO_MAXNUM_VOLS_HAS_BEEN_EXCEEDED, ER_ERROR_SEVERITY, er_set(), fileio_get_base_file_name(), fileio_get_directory_path(), fileio_make_volume_ext_given_name(), fileio_make_volume_ext_name(), fileio_make_volume_temp_name(), boot_dbparm::last_volid, LOG_MAX_DBVOLID, NO_ERROR, NULL, prm_get_string_value(), PRM_ID_IO_TEMP_VOLUME_PATH, PRM_ID_IO_VOLUME_EXT_PATH, boot_dbparm::temp_last_volid, and boot_dbparm::temp_nvols.
Referenced by disk_add_volume().
|
static |
Definition at line 2008 of file boot_sr.c.
References ASSERT_ERROR, boot_Host_name, boot_Server_session_key, css_hostname_to_ip(), err, NO_ERROR, and NULL.
Referenced by boot_restart_server().
|
static |
Definition at line 959 of file boot_sr.c.
References assert, boot_Db_full_name, fileio_get_base_file_name(), fileio_get_directory_path(), fileio_make_volume_temp_name(), free_and_init, NULL, prm_get_string_value(), PRM_ID_IO_TEMP_VOLUME_PATH, and strlen.
Referenced by boot_remove_unknown_temp_volumes().
|
static |
Definition at line 1341 of file boot_sr.c.
References ARG_FILE_LINE, boot_Db_full_name, ER_BO_NOT_A_VOLUME, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_NOTIFICATION_SEVERITY, er_set(), fileio_dismount(), fileio_mount(), logpb_find_volume_info_exist(), NO_ERROR, NULL, NULL_VOLDES, util_compare_filepath(), and xdisk_get_fullname().
Referenced by boot_remove_all_volumes(), boot_restart_server(), and xboot_emergency_patch().
|
static |
Definition at line 682 of file boot_sr.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, BOOTSR_MAX_LINE, char_isspace(), DB_PERMANENT_DATA_PURPOSE, DB_TEMPORARY_DATA_PURPOSE, disk_add_volume_extension(), DISK_VOLPURPOSE, ER_BO_PARSE_ADDVOLS_BAD_NPAGES, ER_BO_PARSE_ADDVOLS_NOGIVEN_NPAGES, ER_BO_PARSE_ADDVOLS_UNKNOWN_PURPOSE, ER_BO_PARSE_ADDVOLS_UNKNOWN_TOKEN, ER_ERROR_SEVERITY, ER_LOG_USER_FILE_UNKNOWN, er_set(), er_set_with_oserror(), intl_mbs_casecmp(), NO_ERROR, NULL, NULL_VOLID, and strlen.
Referenced by boot_create_all_volumes().
|
static |
Definition at line 899 of file boot_sr.c.
References assert, ASSERT_ERROR, BO_IS_SERVER_RESTARTED, boot_db_parm_update_heap(), boot_find_rest_temp_volumes(), boot_remove_unknown_temp_volumes(), boot_xremove_temp_volume(), NO_ERROR, NULL_VOLID, ONLY_PHYSICAL_REMOVE_TEMP_VOL_ACTION, boot_dbparm::temp_last_volid, and boot_dbparm::temp_nvols.
Referenced by boot_remove_all_volumes(), boot_restart_server(), and xboot_shutdown_server().
|
static |
Definition at line 5210 of file boot_sr.c.
References ARG_FILE_LINE, BO_IS_SERVER_RESTARTED, boot_find_rest_volumes(), boot_get_db_parm(), boot_mount(), boot_remove_all_temp_volumes(), boot_server_status(), BOOT_SERVER_UP, disk_get_boot_hfid(), disk_manager_init(), ER_BO_CANNOT_ACCESS_MESSAGE_CATALOG, ER_BO_CANT_LOAD_SYSPRM, er_clear(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), fileio_is_volume_exist(), boot_dbparm::hfid, LOG_DBFIRST_VOLID, log_final(), log_get_io_page_size(), log_restart_emergency(), logpb_delete(), logpb_exist_log(), logtb_define_trantable(), msgcat_init(), NO_ERROR, NULL, boot_dbparm::nvols, ONLY_PHYSICAL_REMOVE_TEMP_VOL_ACTION, SYSPRM_LOAD_ALL, sysprm_load_and_init(), tde_cipher_initialize(), and boot_dbparm::tde_keyinfo_hfid.
Referenced by xboot_delete(), and xboot_initialize_server().
|
static |
Definition at line 500 of file boot_sr.c.
References ARG_FILE_LINE, ER_BO_TRYING_TO_REMOVE_PERMANENT_VOLUME, ER_ERROR_SEVERITY, ER_FATAL_ERROR_SEVERITY, ER_FILE_UNKNOWN_VOLID, er_set(), fileio_get_volume_label(), fileio_unformat(), boot_dbparm::last_volid, LOG_DBFIRST_VOLID, NO_ERROR, NULL_VOLID, PEEK, pgbuf_invalidate_all, boot_dbparm::temp_last_volid, and boot_dbparm::temp_nvols.
Referenced by boot_xremove_temp_volume().
|
static |
Definition at line 995 of file boot_sr.c.
References ARG_FILE_LINE, boot_make_temp_volume_fullname(), ER_BO_UNKNOWN_VOLUME, ER_NOTIFICATION_SEVERITY, er_set(), fileio_is_volume_exist(), fileio_unformat(), boot_dbparm::last_volid, LOG_MAX_DBVOLID, NULL_VOLID, and boot_dbparm::temp_last_volid.
Referenced by boot_remove_all_temp_volumes().
|
static |
Definition at line 585 of file boot_sr.c.
References assert, NULL, and PATH_SEPARATOR.
Referenced by xboot_initialize_server().
int boot_reset_db_parm | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 447 of file boot_sr.c.
References boot_get_db_parm().
Referenced by log_recovery().
int boot_reset_mk_after_restart_from_backup | ( | THREAD_ENTRY * | thread_p, |
BO_RESTART_ARG * | r_args | ||
) |
Definition at line 2941 of file boot_sr.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, boot_db_full_name(), tde_keyinfo::created_time, CTIME_MAX, er_errid(), ER_ERROR_SEVERITY, ER_NOTIFICATION_SEVERITY, er_set(), ER_TDE_INVALID_KEYS_FILE, ER_TDE_RESTORE_CHANGE_MASTER_KEY, ER_TDE_RESTORE_COPY_KEYS_FILE, ER_TDE_RESTORE_KEY_FOUND_ONLY_FROM_BACKUP, ER_TDE_RESTORE_MAKE_KEYS_FILE_OLD, err, fileio_close(), fileio_dismount(), fileio_mount(), fileio_open(), fileio_unformat_and_rename(), tde_cipher::is_loaded, bo_restart_arg::keys_file_path, LOG_DBTDE_KEYS_VOLID, tde_keyinfo::mk_index, NO_ERROR, NULL, NULL_VOLDES, tde_change_mk(), tde_Cipher, tde_copy_keys_file(), tde_find_first_mk(), tde_get_keyinfo(), tde_load_mk(), tde_make_keys_file_fullname(), TDE_MASTER_KEY_LENGTH, tde_validate_keys_file(), thread_get_thread_entry_info(), TRAN_UNACTIVE_COMMITTED, and xtran_server_commit().
Referenced by xboot_restart_from_backup().
int boot_restart_server | ( | THREAD_ENTRY * | thread_p, |
bool | print_restart, | ||
const char * | db_name, | ||
bool | from_backup, | ||
CHECK_ARGS * | check_coll_and_timezone, | ||
BO_RESTART_ARG * | r_args, | ||
bool | skip_vacuum | ||
) |
Definition at line 2046 of file boot_sr.c.
References area_init(), ARG_FILE_LINE, assert, ASSERT_ERROR, assert_release, boot_after_copydb(), boot_Db_full_name, boot_find_rest_volumes(), BOOT_FORMAT_MAX_LENGTH, boot_get_db_charset_from_header(), boot_get_db_parm(), boot_Host_name, boot_Lob_path, boot_make_session_server_key(), boot_mount(), boot_remove_all_temp_volumes(), boot_server_all_finalize(), BOOT_SERVER_DOWN, boot_Server_status, boot_server_status(), BOOT_SERVER_UP, BOOT_SHUTDOWN_EXCEPT_COMMON_MODULES, boot_volume_info_log_path(), catalog_initialize(), catcls_compile_catalog_classes(), catcls_Enable, catcls_find_and_set_cached_class_oid(), catcls_get_db_collation(), catcls_get_server_compat_info(), cfg_find_db_list(), cfg_free_directory(), cfg_maycreate_get_directory_filename(), cfg_read_directory(), cfg_read_directory_ex(), check_args::check_db_coll, check_args::check_timezone, check_timezone_compat(), tz_data::checksum, COMPOSE_FULL_NAME(), css_change_ha_server_state(), css_final_conn_list(), css_ha_mode_string(), css_init_conn_list(), css_set_accessible_ip_info(), css_set_ha_num_of_hosts(), boot_dbparm::ctid, CUB_MAXHOSTNAMELEN, DATABASES_FILENAME, db_private_free, disk_get_boot_hfid(), disk_manager_init(), boot_dbparm::dropped_files_vfid, dwb_load_and_recover_pages(), ER_BO_CANNOT_ACCESS_MESSAGE_CATALOG, ER_BO_CANT_LOAD_SYSPRM, ER_BO_MISSING_OR_INVALID_CATALOG, ER_BO_UNABLE_TO_RESTART_SERVER, ER_BO_UNKNOWN_DATABASE, ER_CFG_NO_FILE, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_ES_NO_LOB_PATH, ER_FAILED, ER_FATAL_ERROR_SEVERITY, er_init(), ER_IO_MOUNT_LOCKED, ER_LOC_INIT, er_msg(), ER_PRM_CONFLICT_EXISTS_ON_MULTIPLE_SECTIONS, er_set(), er_stack_pop(), er_stack_push(), ER_TDE_CIPHER_LOAD_FAIL, ER_THREAD_FINAL, ER_TZ_LOAD_ERROR, ER_WARNING_SEVERITY, ERR_MSG_SIZE, error(), es_init(), event_log_init(), FILE_HEAP, file_tracker_load(), fileio_dismount(), fileio_get_base_file_name(), fileio_mount(), cubthread::finalize(), fpcache_finalize(), fpcache_initialize(), free_and_init, GETHOSTNAME, HA_CHANGE_MODE_IMMEDIATELY, HA_DISABLED, HA_GET_MODE, heap_cache_class_info(), heap_manager_initialize(), boot_dbparm::hfid, cubthread::initialize(), cubthread::initialize_thread_entries(), INTL_CODESET_LAST, INTL_CODESET_NONE, bo_restart_arg::is_restore_from_backup, jsp_start_server(), bo_restart_arg::keys_file_path, lang_charset_cubrid_name(), lang_check_coll_compat(), lang_init(), LANG_MAX_LANGNAME, lang_set_charset(), lang_set_language(), database_info::lobpath, locator_initialize(), locator_initialize_areas(), LOG_DBFIRST_VOLID, LOG_DBTXT_VOLID, log_final(), log_get_io_page_size(), log_initialize(), log_set_db_restore_time(), log_set_ha_promotion_time(), database_info::logpath, logpb_remove_all_in_log_path(), logpb_restore(), logtb_assign_tran_index(), logtb_define_trantable(), logtb_disable_update(), logtb_finalize_global_unique_stats_table(), logtb_free_tran_index(), logtb_initialize_global_unique_stats_table(), logtb_set_to_system_tran_index(), MAX_NTRANS, tf_meta_class::mc_n_variable, MSGCAT_CATALOG_CUBRID, msgcat_final(), MSGCAT_GENERAL_DATABASE_INIT, msgcat_init(), msgcat_message(), MSGCAT_SET_GENERAL, NO_ERROR, NULL, NULL_TRAN_INDEX, NULL_TRANID, NULL_VOLDES, database_info::num_hosts, oid_set_root(), partition_cache_init(), database_info::pathname, perfmon_initialize(), pr_area_init(), pr_Enable_string_compression, prm_get_bool_value(), prm_get_integer_value(), prm_get_name(), prm_get_string_value(), PRM_ID_ACCESS_IP_CONTROL, PRM_ID_DISABLE_VACUUM, PRM_ID_ENABLE_STRING_COMPRESSION, PRM_ID_ER_EXIT_ASK, PRM_ID_ER_LOG_FILE, PRM_ID_HA_MODE, PRM_ID_HA_SERVER_STATE, PRM_ID_JAVA_STORED_PROCEDURE, PRM_ID_JAVA_STORED_PROCEDURE_PORT, PRM_ID_READ_ONLY_MODE, qfile_finalize_list_cache(), qfile_initialize_list_cache(), qmgr_initialize(), rel_bit_platform(), rel_build_number(), rel_build_type(), rel_name(), REMOVE_TEMP_VOL_DEFAULT_ACTION, bo_restart_arg::restore_slave, boot_dbparm::rootclass_hfid, boot_dbparm::rootclass_name, boot_dbparm::rootclass_oid, serial_initialize_cache_pool(), session_states_finalize(), session_states_init(), set_area_init(), skip_to_check_ct_classes_for_rebuild, spage_boot(), strdup(), strlcpy(), strncpy_size, SYSPRM_LOAD_ALL, sysprm_load_and_init(), tde_cipher_initialize(), boot_dbparm::tde_keyinfo_hfid, tf_compile_meta_classes(), tf_Metaclass_class, thread_get_thread_entry_info(), tp_init(), TRAN_ACTIVE, TRAN_DEFAULT_ISOLATION_LEVEL, TRAN_LOCK_INFINITE_WAIT, TRAN_UNACTIVE_COMMITTED, boot_dbparm::trk_vfid, tsc_init(), tz_get_data(), tz_load(), vacuum_boot(), boot_dbparm::vacuum_data_vfid, vacuum_initialize(), boot_dbparm::vacuum_log_block_npages, vacuum_stop_master(), vacuum_stop_workers(), xcache_finalize(), xcache_initialize(), xtran_server_commit(), and xvacuum().
Referenced by net_server_start(), xboot_copy(), xboot_register_client(), and xboot_restart_from_backup().
void boot_server_all_finalize | ( | THREAD_ENTRY * | thread_p, |
ER_FINAL_CODE | is_er_final, | ||
BOOT_SERVER_SHUTDOWN_MODE | shutdown_common_modules | ||
) |
Definition at line 3864 of file boot_sr.c.
References area_final(), BOOT_SERVER_DOWN, boot_server_status(), BOOT_SHUTDOWN_ALL_MODULES, catalog_finalize(), catcls_finalize_class_oid_to_oid_hash_table(), css_free_accessible_ip_info(), disk_manager_final(), ER_ALL_FINAL, er_final(), es_final(), event_log_final(), fileio_dismount_all(), heap_manager_finalize(), lang_final(), lf_destroy_transaction_systems(), locator_finalize(), locator_free_areas(), logtb_finalize_global_unique_stats_table(), msgcat_final(), partition_cache_finalize(), perfmon_finalize(), qmgr_finalize(), serial_finalize_cache_pool(), set_final(), spage_finalize(), sysprm_final(), thread_return_lock_free_transaction_entries(), tp_final(), and tz_unload().
Referenced by boot_create_all_volumes(), boot_restart_server(), xboot_delete(), xboot_emergency_patch(), xboot_initialize_server(), and xboot_shutdown_server().
void boot_server_status | ( | BOOT_SERVER_STATUS | status | ) |
Definition at line 227 of file boot_sr.c.
References ARG_FILE_LINE, BO_IS_SERVER_RESTARTED, BOOT_SERVER_MAINTENANCE, boot_Server_status, BOOT_SERVER_UP, ER_ALL_FINAL, ER_BO_SERVER_STATUS, ER_NOTIFICATION_SEVERITY, er_set(), thread_get_thread_entry_info(), and xboot_shutdown_server().
Referenced by boot_create_all_volumes(), boot_remove_all_volumes(), boot_restart_server(), boot_server_all_finalize(), and xboot_emergency_patch().
Definition at line 5902 of file boot_sr.c.
References skip_to_check_ct_classes_for_rebuild.
|
static |
Definition at line 5784 of file boot_sr.c.
References ARG_FILE_LINE, boot_Db_full_name, ER_BO_CANNOT_FINE_VOLINFO, ER_ERROR_SEVERITY, er_set(), fileio_make_volume_info_name(), LOG_DBLOG_ACTIVE_VOLID, NULL, NULL_VOLID, and PATH_SEPARATOR.
Referenced by boot_restart_server(), xboot_delete(), and xboot_emergency_patch().
|
static |
Definition at line 953 of file boot_sr.c.
References boot_remove_temp_volume().
Referenced by boot_remove_all_temp_volumes().
int catcls_compile_catalog_classes | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 4332 of file catalog_class.c.
References ASSERT_ERROR, tf_ct_attribute::ca_id, catcls_Enable, catcls_find_btid_of_class_name(), catcls_find_class_oid_by_class_name(), catcls_initialize_class_oid_to_oid_hash_table(), CATCLS_OID_TABLE_SIZE, tf_ct_class::cc_atts, tf_ct_class::cc_classoid, tf_ct_class::cc_n_atts, tf_ct_class::cc_name, CT_CLASS_NAME, ct_Classes, db_private_free_and_init, ER_FAILED, error(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), i, NO_ERROR, NULL, OID_ISNULL, or_get_attrname(), PEEK, S_SUCCESS, and thread_get_thread_entry_info().
Referenced by boot_restart_server().
int catcls_finalize_class_oid_to_oid_hash_table | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 280 of file catalog_class.c.
References catcls_free_entry_kv(), CSECT_CT_OID_TABLE, csect_enter, csect_exit, ER_FAILED, free_and_init, INF_WAIT, mht_destroy(), mht_map(), catcls_entry::next, NO_ERROR, and NULL.
Referenced by boot_server_all_finalize().
int catcls_find_and_set_cached_class_oid | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 5325 of file catalog_class.c.
References ER_FAILED, i, LC_CLASSNAME_ERROR, NO_ERROR, NULL_LOCK, OID_CACHE_CLASS_CLASS_ID, OID_CACHE_SIZE, oid_get_cached_class_name(), oid_set_cached_class_oid(), and xlocator_find_class_oid().
Referenced by boot_restart_server().
int catcls_get_db_collation | ( | THREAD_ENTRY * | thread_p, |
LANG_COLL_COMPAT ** | db_collations, | ||
int * | coll_cnt | ||
) |
Definition at line 4910 of file catalog_class.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, catcls_find_class_oid_by_class_name(), lang_coll_compat::checksum, lang_coll_compat::codeset, lang_coll_compat::coll_id, lang_coll_compat::coll_name, CT_DBCOLL_CHARSET_ID_COLUMN, CT_DBCOLL_CHECKSUM_COLUMN, CT_DBCOLL_COLL_ID_COLUMN, CT_DBCOLL_COLL_NAME_COLUMN, db_get_int(), db_get_string(), db_private_alloc, db_private_free_and_init, db_private_realloc, DB_TYPE_INTEGER, DB_TYPE_STRING, DB_VALUE_DOMAIN_TYPE, ER_ERROR_SEVERITY, ER_FAILED, ER_GENERIC_ERROR, ER_LC_UNKNOWN_CLASSNAME, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), heap_attrinfo_end(), heap_attrinfo_read_dbvalues(), heap_attrinfo_start(), heap_get_class_info(), heap_get_class_record(), heap_next(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), heap_scancache_start(), HFID_IS_NULL, i, LANG_MAX_COLLATIONS, NO_ERROR, NULL, OID_ISNULL, OID_SET_NULL, or_get_attrname(), PEEK, S_SUCCESS, and strlen.
Referenced by boot_restart_server().
int catcls_get_server_compat_info | ( | THREAD_ENTRY * | thread_p, |
INTL_CODESET * | charset_id_p, | ||
char * | lang_buf, | ||
const int | lang_buf_size, | ||
char * | timezone_checksum | ||
) |
Definition at line 4462 of file catalog_class.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, catcls_find_class_oid_by_class_name(), db_get_int(), db_get_string(), DB_IS_NULL, db_private_free_and_init, DB_TYPE_INTEGER, DB_TYPE_STRING, DB_VALUE_DOMAIN_TYPE, ER_ERROR_SEVERITY, ER_FAILED, ER_GENERIC_ERROR, ER_LC_UNKNOWN_CLASSNAME, er_set(), error(), heap_attrinfo_end(), heap_attrinfo_read_dbvalues(), heap_attrinfo_start(), heap_get_class_info(), heap_get_class_record(), heap_next(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), heap_scancache_start(), HFID_IS_NULL, i, NO_ERROR, NULL, OID_ISNULL, OID_SET_NULL, or_get_attrname(), PEEK, S_SUCCESS, strlen, and TZ_CHECKSUM_SIZE.
Referenced by boot_restart_server(), and xboot_emergency_patch().
VOLID xboot_add_volume_extension | ( | THREAD_ENTRY * | thread_p, |
DBDEF_VOL_EXT_INFO * | ext_info | ||
) |
Definition at line 551 of file boot_sr.c.
References assert, ASSERT_ERROR, dbdef_vol_ext_info::comments, disk_add_volume_extension(), dbdef_vol_ext_info::max_npages, dbdef_vol_ext_info::max_writesize_in_sec, dbdef_vol_ext_info::name, NO_ERROR, NULL_VOLID, dbdef_vol_ext_info::overwrite, dbdef_vol_ext_info::path, and dbdef_vol_ext_info::purpose.
Referenced by boot_add_volume_extension(), and sboot_add_volume_extension().
int xboot_backup | ( | THREAD_ENTRY * | thread_p, |
const char * | backup_path, | ||
FILEIO_BACKUP_LEVEL | backup_level, | ||
bool | delete_unneeded_logarchives, | ||
const char * | backup_verbose_file, | ||
int | num_threads, | ||
FILEIO_ZIP_METHOD | zip_method, | ||
FILEIO_ZIP_LEVEL | zip_level, | ||
int | skip_activelog, | ||
int | sleep_msecs, | ||
bool | separate_keys | ||
) |
Definition at line 3939 of file boot_sr.c.
References logpb_backup(), and boot_dbparm::nvols.
Referenced by boot_backup(), and sboot_backup().
int xboot_check_db_consistency | ( | THREAD_ENTRY * | thread_p, |
int | check_flag, | ||
OID * | oids, | ||
int | num_oids, | ||
BTID * | index_btid | ||
) |
Definition at line 3713 of file boot_sr.c.
References assert, ASSERT_ERROR_AND_SET, boot_check_permanent_volumes(), BTID_IS_NULL, btree_check_all(), btree_repair_prev_link(), catalog_check_consistency(), CHECK_ONLY, CHECKDB_BTREE_CHECK_ALL_BTREES, CHECKDB_CHECK_PREV_LINK, CHECKDB_CT_CHECK_CAT_CONSISTENCY, CHECKDB_FILE_TRACKER_CHECK, CHECKDB_HEAP_CHECK_ALLHEAPS, CHECKDB_LC_CHECK_ALLENTRIES_OF_ALLBTREES, CHECKDB_LC_CHECK_CLASSNAMES, CHECKDB_REPAIR, CHECKDB_REPAIR_PREV_LINK, disk_check(), DISK_ERROR, DISK_INVALID, disk_lock_extend(), disk_unlock_extend(), DISK_VALID, ER_FAILED, file_tracker_check(), heap_check_all_heaps(), i, locator_check_all_entries_of_all_btrees(), locator_check_class_names(), NO_ERROR, NULL, OID_ISNULL, REPAIR_ALL, and xboot_checkdb_table().
Referenced by boot_check_db_consistency(), sboot_check_db_consistency(), and xboot_unregister_client().
DISK_ISVALID xboot_checkdb_table | ( | THREAD_ENTRY * | thread_p, |
int | check_flag, | ||
OID * | oid, | ||
BTID * | index_btid | ||
) |
Definition at line 3587 of file boot_sr.c.
References btree_check_by_class_oid(), btree_repair_prev_link(), CHECK_ONLY, CHECKDB_CHECK_PREV_LINK, CHECKDB_REPAIR, CHECKDB_REPAIR_PREV_LINK, DISK_ERROR, DISK_VALID, heap_check_heap_file(), heap_get_class_info(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), boot_dbparm::hfid, HFID_IS_NULL, IS_LOCK, LK_GRANTED, LK_UNCOND_LOCK, locator_check_by_class_oid(), lock_object(), lock_unlock_object(), NO_ERROR, NULL, oid_Root_class_oid, PEEK, REPAIR_ALL, S_SUCCESS, and xcallback_console_print().
Referenced by xboot_check_db_consistency().
int xboot_compact_db | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oids, | ||
int | n_classes, | ||
int | space_to_process, | ||
int | instance_lock_timeout, | ||
int | class_lock_timeout, | ||
bool | delete_old_repr, | ||
OID * | last_processed_class_oid, | ||
OID * | last_processed_oid, | ||
int * | total_objects, | ||
int * | failed_objects, | ||
int * | modified_objects, | ||
int * | big_objects, | ||
int * | initial_last_repr_id | ||
) |
Definition at line 5860 of file boot_sr.c.
References boot_compact_db().
Referenced by sboot_compact_db().
int xboot_compact_start | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 5886 of file boot_sr.c.
References boot_compact_start().
Referenced by sboot_compact_start().
int xboot_compact_stop | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 5896 of file boot_sr.c.
References boot_compact_stop().
Referenced by sboot_compact_stop().
int xboot_copy | ( | REFPTR(THREAD_ENTRY, thread_p) | , |
const char * | from_dbname, | ||
const char * | new_db_name, | ||
const char * | new_db_path, | ||
const char * | new_log_path, | ||
const char * | new_lob_path, | ||
const char * | new_db_server_host, | ||
const char * | new_volext_path, | ||
const char * | fileof_vols_and_copypaths, | ||
bool | new_db_overwrite | ||
) |
Definition at line 3975 of file boot_sr.c.
References ARG_FILE_LINE, assert, assert_release, boot_find_new_db_path(), boot_restart_server(), BOOT_SHUTDOWN_EXCEPT_COMMON_MODULES, cfg_add_db(), cfg_find_db_list(), cfg_free_directory(), cfg_maycreate_get_directory_filename(), cfg_read_directory(), cfg_read_directory_ex(), cfg_write_directory(), cfg_write_directory_ex(), check_args::check_db_coll, COMPOSE_FULL_NAME(), cub_dirname_r(), CUB_MAXHOSTNAMELEN, DB_MAX_PATH_LENGTH, ER_BO_DATABASE_EXISTS, ER_BO_DIRECTORY_DOESNOT_EXIST, ER_BO_FULL_DATABASE_NAME_IS_TOO_LONG, ER_BO_UNABLE_TO_FIND_HOSTNAME, ER_ERROR_SEVERITY, ER_ES_GENERAL, ER_ES_INVALID_PATH, ER_FAILED, ER_FATAL_ERROR_SEVERITY, er_set(), er_set_with_oserror(), ER_THREAD_FINAL, ER_WARNING_SEVERITY, error(), es_get_type(), ES_LOCAL, ES_NONE, ES_OWFS, ES_POSIX, fileio_dismount(), fileio_get_base_file_name(), fileio_mount(), GETHOSTNAME, LOB_PATH_DEFAULT_PREFIX, LOG_DBTXT_VOLID, logpb_copy_database(), NO_ERROR, NULL, NULL_VOLDES, boot_dbparm::nvols, p, strlen, thread_get_thread_entry_info(), TRAN_UNACTIVE_COMMITTED, xboot_copy(), xboot_delete(), xboot_shutdown_server(), xtran_server_abort(), and xtran_server_commit().
Referenced by boot_copy(), and xboot_copy().
int xboot_delete | ( | const char * | db_name, |
bool | force_delete, | ||
BOOT_SERVER_SHUTDOWN_MODE | shutdown_common_modules | ||
) |
Definition at line 4653 of file boot_sr.c.
References ARG_FILE_LINE, ASSERT_ERROR, BO_IS_SERVER_RESTARTED, boot_Db_full_name, boot_remove_all_volumes(), boot_server_all_finalize(), BOOT_SHUTDOWN_ALL_MODULES, boot_volume_info_log_path(), cfg_delete_db(), cfg_find_db_list(), cfg_free_directory(), cfg_maycreate_get_directory_filename(), cfg_read_directory(), cfg_read_directory_ex(), cfg_write_directory(), cfg_write_directory_ex(), COMPOSE_FULL_NAME(), ER_BO_CANNOT_ACCESS_MESSAGE_CATALOG, ER_BO_CANT_LOAD_SYSPRM, ER_BO_UNKNOWN_DATABASE, er_clear(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), er_stack_pop(), er_stack_push(), ER_THREAD_FINAL, fileio_dismount(), fileio_get_base_file_name(), fileio_mount(), cubthread::finalize(), cubthread::initialize(), cubthread::initialize_thread_entries(), LOG_DBTXT_VOLID, database_info::logpath, msgcat_init(), NO_ERROR, NULL, NULL_VOLDES, database_info::pathname, perfmon_initialize(), SYSPRM_LOAD_ALL, and sysprm_load_and_init().
Referenced by boot_delete(), and xboot_copy().
int xboot_emergency_patch | ( | const char * | db_name, |
bool | recreate_log, | ||
DKNPAGES | log_npages, | ||
const char * | db_locale, | ||
FILE * | out_fp | ||
) |
Definition at line 5335 of file boot_sr.c.
References ARG_FILE_LINE, ASSERT_ERROR, boot_Db_full_name, boot_find_rest_volumes(), boot_get_db_charset_from_header(), boot_get_db_parm(), boot_mount(), boot_server_all_finalize(), boot_server_status(), BOOT_SERVER_UP, BOOT_SHUTDOWN_ALL_MODULES, boot_volume_info_log_path(), catalog_initialize(), catcls_get_server_compat_info(), cfg_find_db_list(), cfg_free_directory(), cfg_maycreate_get_directory_filename(), cfg_read_directory(), cfg_read_directory_ex(), COMPOSE_FULL_NAME(), boot_dbparm::ctid, DATABASES_FILENAME, db_set_page_size(), disk_get_boot_hfid(), disk_manager_init(), boot_dbparm::dropped_files_vfid, ER_ALL_FINAL, ER_BO_CANT_LOAD_SYSPRM, ER_BO_UNKNOWN_DATABASE, ER_CFG_NO_FILE, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_LOC_INIT, er_msg(), er_set(), ER_THREAD_FINAL, ERR_MSG_SIZE, file_tracker_load(), fileio_dismount(), fileio_get_base_file_name(), fileio_mount(), heap_manager_initialize(), boot_dbparm::hfid, cubthread::initialize(), cubthread::initialize_thread_entries(), INTL_CODESET_ERROR, INTL_CODESET_LAST, INTL_CODESET_NONE, IO_DEFAULT_PAGE_SIZE, lang_charset(), lang_charset_cubrid_name(), lang_init(), LANG_MAX_LANGNAME, lang_set_charset(), lang_set_charset_lang(), locator_initialize(), LOG_DBFIRST_VOLID, LOG_DBTXT_VOLID, log_get_io_page_size(), log_recreate(), log_restart_emergency(), database_info::logpath, logtb_define_trantable(), logtb_initialize_global_unique_stats_table(), msgcat_init(), NO_ERROR, NULL, NULL_VOLDES, oid_set_root(), database_info::pathname, prm_get_bool_value(), PRM_ID_DISABLE_VACUUM, boot_dbparm::rootclass_oid, spage_boot(), SYSPRM_LOAD_ALL, sysprm_load_and_init(), tp_init(), boot_dbparm::trk_vfid, tsc_init(), boot_dbparm::vacuum_data_vfid, vacuum_initialize(), boot_dbparm::vacuum_log_block_npages, xboot_shutdown_server(), xdisk_get_total_numpages(), and xtran_server_commit().
Referenced by boot_emergency_patch().
VOLID xboot_find_last_permanent | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 377 of file boot_sr.c.
References disk_lock_extend(), disk_unlock_extend(), and boot_dbparm::last_volid.
Referenced by boot_find_last_permanent(), disk_check(), logpb_checkpoint(), and sboot_find_last_permanent().
VOLID xboot_find_last_temp | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 407 of file boot_sr.c.
References disk_lock_extend(), disk_unlock_extend(), and boot_dbparm::temp_last_volid.
Referenced by boot_find_last_temp(), disk_check(), and sboot_find_last_temp().
int xboot_find_number_permanent_volumes | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 341 of file boot_sr.c.
References disk_lock_extend(), disk_unlock_extend(), and boot_dbparm::nvols.
Referenced by boot_find_number_permanent_volumes(), disk_check(), and sboot_find_number_permanent_volumes().
int xboot_find_number_temp_volumes | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 359 of file boot_sr.c.
References disk_lock_extend(), disk_unlock_extend(), boot_dbparm::nvols, and boot_dbparm::temp_nvols.
Referenced by boot_find_number_temp_volumes(), disk_check(), and sboot_find_number_temp_volumes().
const char* xboot_get_server_session_key | ( | void | ) |
Definition at line 3151 of file boot_sr.c.
References boot_Server_session_key.
Referenced by ssession_find_or_create_session().
int xboot_heap_compact | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid | ||
) |
Definition at line 5876 of file boot_sr.c.
References boot_heap_compact_pages().
Referenced by sboot_heap_compact().
int xboot_initialize_server | ( | const BOOT_CLIENT_CREDENTIAL * | client_credential, |
BOOT_DB_PATH_INFO * | db_path_info, | ||
bool | db_overwrite, | ||
const char * | file_addmore_vols, | ||
volatile DKNPAGES | db_npages, | ||
PGLENGTH | db_desired_pagesize, | ||
volatile DKNPAGES | log_npages, | ||
PGLENGTH | db_desired_log_page_size, | ||
OID * | rootclass_oid, | ||
HFID * | rootclass_hfid, | ||
int | client_lock_wait, | ||
TRAN_ISOLATION | client_isolation | ||
) |
Definition at line 1462 of file boot_sr.c.
References area_init(), ARG_FILE_LINE, assert, ASSERT_ERROR, assert_release, BO_IS_SERVER_RESTARTED, boot_create_all_volumes(), boot_ctrl_c_in_init_server(), boot_Db_full_name, boot_find_root_heap(), BOOT_FORMAT_MAX_LENGTH, boot_remove_all_volumes(), boot_remove_useless_path_separator(), boot_server_all_finalize(), BOOT_SHUTDOWN_EXCEPT_COMMON_MODULES, cfg_add_db(), cfg_find_db_list(), cfg_free_directory(), cfg_maycreate_get_directory_filename(), cfg_read_directory(), cfg_read_directory_ex(), cfg_update_db(), cfg_write_directory(), cfg_write_directory_ex(), cub_dirname_r(), boot_db_path_info::db_comments, boot_db_path_info::db_host, DB_MAX_PATH_LENGTH, boot_client_credential::db_name, boot_db_path_info::db_path, db_set_page_size(), DB_SIZEOF, ER_ALL_FINAL, ER_BO_CANNOT_ACCESS_MESSAGE_CATALOG, ER_BO_CANNOT_CREATE_LINK, ER_BO_CANNOT_CREATE_VOL, ER_BO_CANT_LOAD_SYSPRM, ER_BO_DATABASE_EXISTS, ER_BO_DIRECTORY_DOESNOT_EXIST, ER_BO_FULL_DATABASE_NAME_IS_TOO_LONG, ER_BO_UNABLE_TO_RESTART_SERVER, ER_BO_UNKNOWN_DATABASE, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_ES_GENERAL, ER_ES_INVALID_PATH, er_get_msglog_filename(), ER_INTERRUPTED, ER_LOC_INIT, er_log_debug, ER_NOTIFICATION_SEVERITY, er_set(), er_set_with_oserror(), er_stack_pop(), er_stack_push(), ER_THREAD_FINAL, ER_TZ_LOAD_ERROR, es_get_type(), ES_NONE, ES_POSIX, fileio_dismount(), fileio_get_base_file_name(), fileio_mount(), cubthread::finalize(), boot_client_credential::get_db_name(), HFID_IS_NULL, database_info::hosts, cubthread::initialize(), cubthread::initialize_thread_entries(), lang_init(), boot_db_path_info::lob_path, LOB_PATH_DEFAULT_PREFIX, LOB_PATH_PREFIX_MAX, database_info::lobpath, LOG_DBTXT_VOLID, log_final(), boot_db_path_info::log_path, database_info::logpath, logpb_check_exist_any_volumes(), logtb_release_tran_index(), MSGCAT_CATALOG_CUBRID, MSGCAT_GENERAL_DATABASE_INIT, msgcat_init(), msgcat_message(), MSGCAT_SET_GENERAL, database_info::name, NO_ERROR, NULL, NULL_TRAN_INDEX, NULL_VOLDES, os_set_signal_handler(), p, db_identifier::pageid, PATH_SEPARATOR, database_info::pathname, pr_area_init(), prm_get_bigint_value(), PRM_ID_DB_VOLUME_SIZE, PRM_ID_LOG_VOLUME_SIZE, rel_bit_platform(), rel_build_number(), rel_build_type(), rel_name(), ROOTCLASS_NAME, boot_dbparm::rootclass_name, boot_dbparm::rootclass_oid, session_states_init(), set_area_init(), db_identifier::slotid, strlen, strncpy_size, SYSPRM_LOAD_ALL, sysprm_load_and_init(), thread_get_thread_entry_info(), tp_init(), tsc_init(), tz_load(), boot_db_path_info::vol_path, db_identifier::volid, and xboot_shutdown_server().
Referenced by boot_initialize_server().
VOLID xboot_peek_last_permanent | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 396 of file boot_sr.c.
References boot_dbparm::last_volid.
int xboot_register_client | ( | THREAD_ENTRY * | thread_p, |
BOOT_CLIENT_CREDENTIAL * | client_credential, | ||
int | client_lock_wait, | ||
TRAN_ISOLATION | client_isolation, | ||
TRAN_STATE * | tran_state, | ||
BOOT_SERVER_CREDENTIAL * | server_credential | ||
) |
Definition at line 3179 of file boot_sr.c.
References ARG_FILE_LINE, BO_IS_SERVER_RESTARTED, boot_Db_full_name, boot_find_root_heap(), boot_Host_name, boot_Lob_path, BOOT_NORMAL_CLIENT_TYPE, boot_restart_server(), boot_Server_session_key, check_args::check_db_coll, check_args::check_timezone, clientids::client_type, CONN_OPEN, COPY_OID, css_check_ha_server_state_for_client(), css_ha_server_state(), css_notify_ha_log_applier_state(), boot_server_credential::db_charset, DB_CLIENT_TYPE_ADMIN_UTILITY, DB_CLIENT_TYPE_LOG_APPLIER, DB_CLIENT_TYPE_SKIP_VACUUM_ADMIN_CSQL, DB_CLIENT_TYPE_SKIP_VACUUM_CSQL, boot_server_credential::db_full_name, boot_server_credential::db_lang, DB_MAX_IDENTIFIER_LENGTH, clientids::db_user, boot_server_credential::disk_compatibility, ER_BO_CLIENT_CONNECTED, er_log_debug, ER_NOTIFICATION_SEVERITY, er_set(), boot_client_credential::get_db_name(), clientids::get_db_user(), clientids::get_host_name(), clientids::get_program_name(), HA_LOG_APPLIER_STATE_UNREGISTERED, boot_server_credential::ha_server_state, HFID_IS_NULL, boot_server_credential::host_name, intl_identifier_upper(), IO_PAGESIZE, lang_charset(), lang_get_Lang_name(), boot_server_credential::lob_path, boot_server_credential::log_page_size, LOG_PAGESIZE, logtb_assign_tran_index(), logtb_release_tran_index(), NO_ERROR, NULL, NULL_TRAN_INDEX, NULL_TRANID, boot_server_credential::page_size, PATH_SEPARATOR, prm_get_integer_value(), PRM_ID_HA_SERVER_STATE, clientids::process_id, boot_server_credential::process_id, clientids::program_name, rel_disk_compatible(), boot_server_credential::root_class_hfid, boot_server_credential::root_class_oid, boot_dbparm::rootclass_oid, boot_server_credential::server_session_key, SERVER_SESSION_KEY_SIZE, showstmt_scan_init(), strlen, TRAN_ACTIVE, and TRAN_UNACTIVE_UNKNOWN.
Referenced by boot_register_client(), and sboot_register_client().
int xboot_restart_from_backup | ( | THREAD_ENTRY * | thread_p, |
int | print_restart, | ||
const char * | db_name, | ||
BO_RESTART_ARG * | r_args | ||
) |
Definition at line 2850 of file boot_sr.c.
References area_init(), ARG_FILE_LINE, boot_reset_mk_after_restart_from_backup(), boot_restart_server(), ER_BO_CANNOT_ACCESS_MESSAGE_CATALOG, er_errid(), ER_ERROR_SEVERITY, ER_LOC_INIT, er_set(), ER_TZ_LOAD_ERROR, tde_cipher::is_loaded, lang_init(), LOG_FIND_THREAD_TRAN_INDEX, msgcat_init(), NO_ERROR, NULL, NULL_TRAN_INDEX, PRM_ID_DBFILES_PROTECT, prm_set_bool_value(), SYSPRM_LOAD_ALL, sysprm_load_and_init(), tde_Cipher, tp_init(), and tz_load().
Referenced by boot_delete().
bool xboot_shutdown_server | ( | REFPTR(THREAD_ENTRY, thread_p) | , |
ER_FINAL_CODE | is_er_final | ||
) |
Definition at line 3080 of file boot_sr.c.
References BO_IS_SERVER_RESTARTED, boot_remove_all_temp_volumes(), boot_server_all_finalize(), BOOT_SHUTDOWN_EXCEPT_COMMON_MODULES, dwb_destroy(), ER_ALL_FINAL, er_stack_pop(), er_stack_push(), cubthread::finalize(), fpcache_finalize(), log_abort_all_active_transaction(), log_final(), log_stop_ha_delay_registration(), logtb_reflect_global_unique_stats_to_btree(), logtb_set_to_system_tran_index(), NULL, prm_get_name(), PRM_ID_SUPPRESS_FSYNC, qfile_finalize_list_cache(), REMOVE_TEMP_VOL_DEFAULT_ACTION, session_states_finalize(), sysprm_set_force(), vacuum_sa_reflect_last_blockid(), vacuum_stop_master(), vacuum_stop_workers(), and xcache_finalize().
Referenced by boot_server_status(), boot_shutdown_server(), net_server_start(), xboot_copy(), xboot_emergency_patch(), xboot_initialize_server(), and xboot_unregister_client().
int xboot_soft_rename | ( | THREAD_ENTRY * | thread_p, |
const char * | old_db_name, | ||
const char * | new_db_name, | ||
const char * | new_db_path, | ||
const char * | new_log_path, | ||
const char * | new_db_server_host, | ||
const char * | new_volext_path, | ||
const char * | fileof_vols_and_renamepaths, | ||
bool | new_db_overwrite, | ||
bool | extern_rename, | ||
bool | force_delete | ||
) |
Definition at line 4381 of file boot_sr.c.
References ARG_FILE_LINE, boot_Db_full_name, boot_find_new_db_path(), boot_get_lob_path(), cfg_add_db(), cfg_delete_db(), cfg_find_db_list(), cfg_free_directory(), cfg_maycreate_get_directory_filename(), cfg_read_directory(), cfg_read_directory_ex(), cfg_update_db(), cfg_write_directory(), cfg_write_directory_ex(), COMPOSE_FULL_NAME(), CUB_MAXHOSTNAMELEN, DB_MAX_PATH_LENGTH, ER_BO_CWD_FAIL, ER_BO_DATABASE_EXISTS, ER_BO_FULL_DATABASE_NAME_IS_TOO_LONG, ER_BO_UNABLE_TO_FIND_HOSTNAME, ER_BO_UNKNOWN_DATABASE, ER_ERROR_SEVERITY, ER_FAILED, ER_FATAL_ERROR_SEVERITY, er_set(), er_set_with_oserror(), fileio_dismount(), fileio_get_base_file_name(), fileio_get_directory_path(), fileio_mount(), GETHOSTNAME, database_info::hosts, LOG_DBTXT_VOLID, log_Name_active, database_info::logpath, logpb_rename_all_volumes_files(), database_info::name, NO_ERROR, NULL, NULL_VOLDES, boot_dbparm::nvols, database_info::pathname, strlen, and strncpy_bufsize.
Referenced by boot_soft_rename().
int xboot_unregister_client | ( | REFPTR(THREAD_ENTRY, thread_p) | , |
int | tran_index | ||
) |
Definition at line 3343 of file boot_sr.c.
References ARG_FILE_LINE, BO_IS_SERVER_RESTARTED, BOOT_NORMAL_CLIENT_TYPE, log_tdes::client, css_conn_entry::client_id, log_tdes::client_id, clientids::client_type, CONN_CLOSING, CONN_OPEN, css_check_ha_server_state_for_client(), css_notify_ha_log_applier_state(), DB_CLIENT_TYPE_LOG_APPLIER, envvar_get(), ER_ALL_FINAL, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_get_msglog_filename(), er_log_debug, er_set(), clientids::get_db_user(), HA_LOG_APPLIER_STATE_UNREGISTERED, if(), LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, LOG_ISTRAN_ACTIVE, LOG_SET_CURRENT_TRAN_INDEX, logtb_release_tran_index(), NO_ERROR, NULL, NULL_TRAN_INDEX, css_conn_entry::status, xboot_check_db_consistency(), xboot_shutdown_server(), and xtran_server_abort().
Referenced by boot_unregister_client(), and net_server_conn_down().
|
static |
Definition at line 158 of file boot_sr.c.
Referenced by boot_check_permanent_volumes(), boot_create_all_volumes(), boot_db_full_name(), boot_db_name(), boot_find_new_db_path(), boot_find_rest_permanent_volumes(), boot_find_rest_temp_volumes(), boot_get_db_charset_from_header(), boot_get_new_volume_name_and_id(), boot_make_temp_volume_fullname(), boot_mount(), boot_restart_server(), boot_volume_info_log_path(), xboot_delete(), xboot_emergency_patch(), xboot_initialize_server(), xboot_register_client(), and xboot_soft_rename().
|
static |
Definition at line 161 of file boot_sr.c.
Referenced by boot_dbparm_save_volume().
|
static |
|
static |
Definition at line 163 of file boot_sr.c.
Referenced by boot_get_lob_path(), boot_restart_server(), and xboot_register_client().
|
static |
Definition at line 165 of file boot_sr.c.
Referenced by boot_make_session_server_key(), xboot_get_server_session_key(), and xboot_register_client().
BOOT_SERVER_STATUS boot_Server_status = BOOT_SERVER_DOWN |
Definition at line 148 of file boot_sr.c.
Referenced by boot_restart_server(), boot_server_status(), logpb_debug_check_log_page(), logpb_remove_archive_logs_internal(), and server_capabilities().
|
static |
bool catcls_Enable |
Definition at line 102 of file catalog_class.c.
Referenced by boot_restart_server().
|
static |
Definition at line 164 of file boot_sr.c.
Referenced by boot_restart_server(), and boot_set_skip_check_ct_classes().