CUBRID Engine
latest
|
Go to the source code of this file.
Classes | |
struct | database_info |
Macros | |
#define | DATABASES_ENVNAME "DATABASES" |
#define | DATABASES_FILENAME "databases.txt" |
#define | MAX_NUM_DB_HOSTS 32 |
Typedefs | |
typedef struct database_info | DB_INFO |
Functions | |
char * | cfg_os_working_directory (void) |
char * | cfg_maycreate_get_directory_filename (char *buffer) |
int | cfg_read_directory (DB_INFO **info_p, bool write_flag) |
void | cfg_write_directory (const DB_INFO *databases) |
int | cfg_read_directory_ex (int vdes, DB_INFO **info_p, bool write_flag) |
void | cfg_write_directory_ex (int vdes, const DB_INFO *databases) |
void | cfg_free_directory (DB_INFO *databases) |
void | cfg_update_db (DB_INFO *db_info_p, const char *path, const char *logpath, const char *lobpath, const char *host) |
DB_INFO * | cfg_new_db (const char *name, const char *path, const char *logpath, const char *lobpath, const char **hosts) |
DB_INFO * | cfg_find_db_list (DB_INFO *dir, const char *name) |
DB_INFO * | cfg_add_db (DB_INFO **dir, const char *name, const char *path, const char *logpath, const char *lobpath, const char *host) |
DB_INFO * | cfg_find_db (const char *db_name) |
bool | cfg_delete_db (DB_INFO **dir_info_p, const char *name) |
char ** | cfg_get_hosts (const char *prim_host, int *count, bool include_local_host) |
void | cfg_free_hosts (char **host_array) |
char * | cfg_create_host_list (const char *primary_host_name, bool append_local_host, int *cnt) |
#define DATABASES_ENVNAME "DATABASES" |
Definition at line 32 of file databases_file.h.
Referenced by cfg_get_directory_filename().
#define DATABASES_FILENAME "databases.txt" |
Definition at line 41 of file databases_file.h.
Referenced by boot_restart_server(), cfg_find_db(), cfg_get_directory_filename(), cfg_read_directory(), cfg_read_directory_ex(), qdata_list_dbs(), and xboot_emergency_patch().
#define MAX_NUM_DB_HOSTS 32 |
Definition at line 44 of file databases_file.h.
Referenced by boot_client_all_finalize(), and report_abnormal_host_status().
typedef struct database_info DB_INFO |
Definition at line 52 of file databases_file.h.
DB_INFO* cfg_add_db | ( | DB_INFO ** | dir, |
const char * | name, | ||
const char * | path, | ||
const char * | logpath, | ||
const char * | lobpath, | ||
const char * | host | ||
) |
Definition at line 1035 of file databases_file.c.
References cfg_new_db(), host, database_info::next, and NULL.
Referenced by installdb(), xboot_copy(), xboot_initialize_server(), and xboot_soft_rename().
Definition at line 1425 of file databases_file.c.
References assert, cfg_host_exists(), CFG_HOST_SEPARATOR, cfg_pop_host(), CUB_MAXHOSTNAMELEN, free_and_init, GETHOSTNAME, NULL, prm_get_string_value(), PRM_ID_CFG_DB_HOSTS, and strlen.
Referenced by cfg_get_hosts().
Definition at line 1128 of file databases_file.c.
References cfg_free_directory(), database_info::name, database_info::next, NULL, and success().
Referenced by installdb(), xboot_delete(), and xboot_soft_rename().
Definition at line 1067 of file databases_file.c.
References ARG_FILE_LINE, cfg_find_db_list(), cfg_free_directory(), cfg_new_db(), cfg_read_directory(), DATABASES_FILENAME, ER_CFG_FIND_DATABASE, ER_CFG_READ_DATABASES, ER_ERROR_SEVERITY, er_set(), ER_WARNING_SEVERITY, database_info::hosts, database_info::lobpath, database_info::logpath, database_info::name, NO_ERROR, NULL, and database_info::pathname.
Referenced by boot_restart_client(), installdb(), javasp_check_database(), main(), sboot_change_ha_mode(), and server_monitor_thr_f().
Definition at line 1008 of file databases_file.c.
void cfg_free_directory | ( | DB_INFO * | databases | ) |
Definition at line 759 of file databases_file.c.
References cfg_free_hosts(), free_and_init, database_info::hosts, i, database_info::lobpath, database_info::logpath, database_info::name, database_info::next, NULL, and database_info::pathname.
Referenced by alterdbhost(), boot_initialize_client(), boot_restart_client(), boot_restart_server(), cfg_delete_db(), cfg_find_db(), cfg_read_directory(), cfg_read_directory_ex(), gen_tz(), get_db_path(), installdb(), javasp_check_database(), print_backup_info(), qdata_list_dbs(), sboot_change_ha_mode(), server_monitor_thr_f(), tzc_compute_timezone_checksum(), xboot_copy(), xboot_delete(), xboot_emergency_patch(), xboot_initialize_server(), and xboot_soft_rename().
void cfg_free_hosts | ( | char ** | host_array | ) |
Definition at line 1222 of file databases_file.c.
References free_and_init, and NULL.
Referenced by alterdbhost(), boot_restart_client(), cfg_free_directory(), and cfg_update_db().
Definition at line 1174 of file databases_file.c.
References cfg_create_host_list(), CFG_HOST_SEPARATOR, cubregex::count(), free_and_init, i, and NULL.
Referenced by alterdbhost(), boot_client_all_finalize(), boot_restart_client(), cfg_new_db(), cfg_read_directory(), cfg_read_directory_ex(), and cfg_update_db().
char* cfg_maycreate_get_directory_filename | ( | char * | buffer | ) |
Definition at line 277 of file databases_file.c.
References ARG_FILE_LINE, cfg_get_directory_filename(), ER_CFG_NO_WRITE_ACCESS, ER_ERROR_SEVERITY, er_set_with_oserror(), ER_WARNING_SEVERITY, and NULL.
Referenced by alterdbhost(), boot_restart_server(), xboot_copy(), xboot_delete(), xboot_emergency_patch(), xboot_initialize_server(), and xboot_soft_rename().
DB_INFO* cfg_new_db | ( | const char * | name, |
const char * | path, | ||
const char * | logpath, | ||
const char * | lobpath, | ||
const char ** | hosts | ||
) |
Definition at line 904 of file databases_file.c.
References cfg_copy_hosts(), cfg_get_hosts(), cfg_os_working_directory(), DB_SIZEOF, error(), free_and_init, database_info::hosts, database_info::lobpath, database_info::logpath, database_info::name, database_info::next, NULL, database_info::num_hosts, database_info::pathname, and strdup().
Referenced by boot_initialize_client(), boot_restart_client(), cfg_add_db(), and cfg_find_db().
char* cfg_os_working_directory | ( | void | ) |
Definition at line 257 of file databases_file.c.
References NULL.
Referenced by cfg_new_db().
Definition at line 394 of file databases_file.c.
References ARG_FILE_LINE, cfg_ensure_directory_write(), cfg_free_directory(), cfg_get_hosts(), CFG_MAX_LINE, cfg_next_char(), cfg_open_directory_file(), cfg_pop_token(), DATABASES_FILENAME, ER_CFG_INVALID_DATABASES, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, HA_DISABLED, database_info::hosts, database_info::lobpath, database_info::logpath, database_info::name, database_info::next, NO_ERROR, NULL, database_info::num_hosts, database_info::pathname, prm_get_string_value(), and PRM_ID_HA_NODE_LIST.
Referenced by alterdbhost(), boot_restart_server(), cfg_find_db(), cfg_read_directory_ex(), cfg_write_directory_ex(), gen_tz(), get_db_path(), installdb(), print_backup_info(), qdata_list_dbs(), tzc_compute_timezone_checksum(), xboot_copy(), xboot_delete(), xboot_emergency_patch(), xboot_initialize_server(), and xboot_soft_rename().
Definition at line 497 of file databases_file.c.
References ARG_FILE_LINE, cfg_free_directory(), cfg_get_hosts(), cfg_next_char(), cfg_next_line(), cfg_pop_linetoken(), cfg_read_directory(), DATABASES_FILENAME, ER_CFG_INVALID_DATABASES, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, database_info::hosts, database_info::lobpath, database_info::logpath, database_info::name, database_info::next, NO_ERROR, NULL, database_info::num_hosts, and database_info::pathname.
Referenced by alterdbhost(), boot_restart_server(), xboot_copy(), xboot_delete(), xboot_emergency_patch(), xboot_initialize_server(), and xboot_soft_rename().
void cfg_update_db | ( | DB_INFO * | db_info_p, |
const char * | path, | ||
const char * | logpath, | ||
const char * | lobpath, | ||
const char * | host | ||
) |
Definition at line 847 of file databases_file.c.
References cfg_free_hosts(), cfg_get_hosts(), free_and_init, database_info::hosts, database_info::lobpath, database_info::logpath, NULL, database_info::num_hosts, database_info::pathname, and strdup().
Referenced by xboot_initialize_server(), and xboot_soft_rename().
Definition at line 599 of file databases_file.c.
References cfg_open_directory_file(), database_info::hosts, database_info::lobpath, database_info::logpath, database_info::name, database_info::next, NULL, database_info::pathname, and strlen.
Referenced by alterdbhost(), installdb(), xboot_copy(), xboot_delete(), xboot_initialize_server(), and xboot_soft_rename().
Definition at line 687 of file databases_file.c.
References cfg_read_directory(), database_info::hosts, database_info::lobpath, database_info::logpath, database_info::name, database_info::next, NULL, database_info::pathname, and strlen.
Referenced by alterdbhost(), xboot_copy(), xboot_delete(), xboot_initialize_server(), and xboot_soft_rename().