CUBRID Engine  latest
databases_file.h File Reference
This graph shows which files directly or indirectly include this file:

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_INFOcfg_new_db (const char *name, const char *path, const char *logpath, const char *lobpath, const char **hosts)
 
DB_INFOcfg_find_db_list (DB_INFO *dir, const char *name)
 
DB_INFOcfg_add_db (DB_INFO **dir, const char *name, const char *path, const char *logpath, const char *lobpath, const char *host)
 
DB_INFOcfg_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)
 

Macro Definition Documentation

#define DATABASES_ENVNAME   "DATABASES"

Definition at line 32 of file databases_file.h.

Referenced by cfg_get_directory_filename().

#define DATABASES_FILENAME   "databases.txt"
#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 Documentation

typedef struct database_info DB_INFO

Definition at line 52 of file databases_file.h.

Function Documentation

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

Here is the caller graph for this function:

char* cfg_create_host_list ( const char *  primary_host_name,
bool  append_local_host,
int *  cnt 
)

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

Here is the caller graph for this function:

bool cfg_delete_db ( DB_INFO **  dir_info_p,
const char *  name 
)

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

Here is the caller graph for this function:

DB_INFO* cfg_find_db_list ( DB_INFO dir,
const char *  name 
)

Definition at line 1008 of file databases_file.c.

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

Here is the caller graph for this function:

char** cfg_get_hosts ( const char *  prim_host,
int *  count,
bool  include_local_host 
)
char* cfg_maycreate_get_directory_filename ( char *  buffer)
DB_INFO* cfg_new_db ( const char *  name,
const char *  path,
const char *  logpath,
const char *  lobpath,
const char **  hosts 
)
char* cfg_os_working_directory ( void  )

Definition at line 257 of file databases_file.c.

References NULL.

Referenced by cfg_new_db().

Here is the caller graph for this function:

void cfg_update_db ( DB_INFO db_info_p,
const char *  path,
const char *  logpath,
const char *  lobpath,
const char *  host 
)
void cfg_write_directory_ex ( int  vdes,
const DB_INFO databases 
)