CUBRID Engine  latest
boot_sr.c File Reference
#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_PARMboot_Db_parm = &boot_Struct_db_parm
 
static OIDboot_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
 

Macro Definition Documentation

#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 */

Definition at line 101 of file boot_sr.c.

#define BOOTSR_MAX_LINE   500

Definition at line 105 of file boot_sr.c.

Referenced by boot_parse_add_volume_extensions().

Typedef Documentation

typedef struct boot_dbparm BOOT_DB_PARM

Definition at line 107 of file boot_sr.c.

Definition at line 133 of file boot_sr.c.

Enumeration Type Documentation

anonymous enum
Enumerator
CHECK_ONLY 
REPAIR_ALL 

Definition at line 3573 of file boot_sr.c.

Enumerator
REMOVE_TEMP_VOL_DEFAULT_ACTION 
ONLY_PHYSICAL_REMOVE_TEMP_VOL_ACTION 

Definition at line 131 of file boot_sr.c.

Function Documentation

static int boot_after_copydb ( THREAD_ENTRY thread_p)
static
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

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().

Here is the caller graph for this function:

static void boot_ctrl_c_in_init_server ( int  ignore_signo)
static

Definition at line 1390 of file boot_sr.c.

Referenced by xboot_initialize_server().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

static char * boot_find_new_db_path ( char *  db_pathbuf,
const char *  fileof_vols_and_wherepaths 
)
static
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().

Here is the caller graph for this function:

static int boot_find_rest_permanent_volumes ( THREAD_ENTRY thread_p,
bool  newvolpath,
bool  use_volinfo,
VOLID  volid,
int(*)(THREAD_ENTRY *thread_p, VOLID xvolid, const char *vlabel, void *args)  fun,
void *  args 
)
static
static void boot_find_rest_temp_volumes ( THREAD_ENTRY thread_p,
VOLID  volid,
int(*)(THREAD_ENTRY *thread_p, VOLID xvolid, const char *vlabel)  fun,
bool  forward_dir,
bool  check_before_access 
)
static
static int boot_find_rest_volumes ( THREAD_ENTRY thread_p,
BO_RESTART_ARG r_args,
VOLID  volid,
int(*)(THREAD_ENTRY *thread_p, VOLID xvolid, const char *vlabel, void *args)  fun,
void *  args 
)
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().

Here is the caller graph for this function:

static int boot_generate_tde_keys ( THREAD_ENTRY thread_p)
static
static INTL_CODESET boot_get_db_charset_from_header ( THREAD_ENTRY thread_p,
const char *  log_path,
const char *  log_prefix 
)
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().

Here is the caller graph for this function:

static int boot_get_db_parm ( THREAD_ENTRY thread_p,
BOOT_DB_PARM dbparm,
OID dbparm_oid 
)
static
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().

Here is the caller graph for this function:

static int boot_make_session_server_key ( void  )
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().

Here is the caller graph for this function:

static void boot_make_temp_volume_fullname ( char *  temp_vol_fullname,
VOLID  temp_volid 
)
static
static int boot_mount ( THREAD_ENTRY thread_p,
VOLID  volid,
const char *  vlabel,
void *  ignore_arg 
)
static
static void boot_remove_unknown_temp_volumes ( THREAD_ENTRY thread_p)
static
static void boot_remove_useless_path_separator ( const char *  path,
char *  new_path 
)
static

Definition at line 585 of file boot_sr.c.

References assert, NULL, and PATH_SEPARATOR.

Referenced by xboot_initialize_server().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

bool boot_set_skip_check_ct_classes ( bool  val)

Definition at line 5902 of file boot_sr.c.

References skip_to_check_ct_classes_for_rebuild.

static char * boot_volume_info_log_path ( char *  log_path)
static
static int boot_xremove_temp_volume ( THREAD_ENTRY thread_p,
VOLID  volid,
const char *  vlabel 
)
static

Definition at line 953 of file boot_sr.c.

References boot_remove_temp_volume().

Referenced by boot_remove_all_temp_volumes().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

int catcls_find_and_set_cached_class_oid ( THREAD_ENTRY thread_p)
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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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_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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

Variable Documentation

BOOT_DB_PARM* boot_Db_parm = &boot_Struct_db_parm
static

Definition at line 161 of file boot_sr.c.

Referenced by boot_dbparm_save_volume().

OID* boot_Db_parm_oid = &boot_Header_oid
static

Definition at line 162 of file boot_sr.c.

OID boot_Header_oid
static

Definition at line 159 of file boot_sr.c.

bool boot_Init_server_is_canceled = false
static

Definition at line 1382 of file boot_sr.c.

jmp_buf boot_Init_server_jmpbuf
static

Definition at line 1379 of file boot_sr.c.

char boot_Lob_path[PATH_MAX+LOB_PATH_PREFIX_MAX] = ""
static

Definition at line 163 of file boot_sr.c.

Referenced by boot_get_lob_path(), boot_restart_server(), and xboot_register_client().

char boot_Server_session_key[SERVER_SESSION_KEY_SIZE]
static
BOOT_DB_PARM boot_Struct_db_parm
static

Definition at line 160 of file boot_sr.c.

bool catcls_Enable

Definition at line 102 of file catalog_class.c.

Referenced by boot_restart_server().

bool skip_to_check_ct_classes_for_rebuild = false
static

Definition at line 164 of file boot_sr.c.

Referenced by boot_restart_server(), and boot_set_skip_check_ct_classes().