CUBRID Engine
latest
|
#include "broker_config.h"
#include "environment_variable.h"
#include "shard_metadata.h"
#include "shard_shm.h"
#include "shard_key_func.h"
Go to the source code of this file.
Functions | |
int | admin_start_cmd (T_BROKER_INFO *, int, int, bool, char *) |
int | admin_stop_cmd (int) |
int | admin_add_cmd (int, const char *) |
int | admin_restart_cmd (int, const char *, int) |
int | admin_drop_cmd (int, const char *) |
int | admin_on_cmd (int, const char *) |
int | admin_off_cmd (int, const char *) |
int | admin_reset_cmd (int, const char *) |
int | admin_info_cmd (int) |
int | admin_conf_change (int, const char *, const char *, const char *, int) |
int | admin_getid_cmd (int, int, const char **) |
int | admin_del_cas_log (int master_shmid, const char *broker, int asid) |
int | admin_acl_status_cmd (int master_shm_id, const char *broker_name) |
int | admin_acl_reload_cmd (int master_shm_id, const char *broker_name) |
void | admin_init_env (void) |
Variables | |
char | admin_err_msg [] |
int admin_acl_reload_cmd | ( | int | master_shm_id, |
const char * | broker_name | ||
) |
Definition at line 2743 of file broker_admin_pub.c.
References t_shm_broker::access_control, t_shm_broker::access_control_file, access_control_read_config_file(), admin_err_msg, t_broker_info::appl_server_shm_id, br_index, t_shm_broker::br_info, FID_ACCESS_CONTROL_FILE, get_cubrid_file_ptr(), i, t_broker_info::name, NULL, t_shm_broker::num_broker, OFF, t_broker_info::service_flag, set_cubrid_file(), shm_appl, SHM_APPL_SERVER, shm_br, SHM_BROKER, SHM_MODE_ADMIN, SHM_OPEN_ERR_MSG, uw_get_error_code(), uw_get_os_error_code(), uw_shm_detach(), and uw_shm_open().
Referenced by main().
int admin_acl_status_cmd | ( | int | master_shm_id, |
const char * | broker_name | ||
) |
Definition at line 2546 of file broker_admin_pub.c.
References t_shm_broker::access_control, t_shm_broker::access_control_file, t_shm_appl_server::access_info, ip_info::address_list, admin_err_msg, t_broker_info::appl_server_shm_id, br_index, t_shm_broker::br_info, t_shm_appl_server::broker_name, access_list::dbname, access_list::dbuser, i, IP_BYTE_COUNT, access_list::ip_files, access_list::ip_info, ip_info::last_access_time, t_broker_info::name, NULL, t_shm_appl_server::num_access_info, t_shm_broker::num_broker, ip_info::num_list, OFF, t_broker_info::service_flag, shm_appl, SHM_APPL_SERVER, shm_br, SHM_BROKER, SHM_MODE_MONITOR, SHM_OPEN_ERR_MSG, uw_get_error_code(), uw_get_os_error_code(), uw_shm_detach(), and uw_shm_open().
Referenced by main().
int admin_add_cmd | ( | int | , |
const char * | |||
) |
Definition at line 515 of file broker_admin_pub.c.
References admin_err_msg, t_broker_info::appl_server_max_num, t_broker_info::appl_server_num, t_broker_info::appl_server_shm_id, as_activate(), t_shm_appl_server::as_info, t_broker_info::auto_add_appl_server, br_index, t_shm_broker::br_info, free_env(), i, make_env(), t_broker_info::name, NULL, t_shm_appl_server::num_appl_server, t_shm_broker::num_broker, ON, t_appl_server_info::service_flag, SERVICE_ON, t_broker_info::shard_flag, SHM_APPL_SERVER, shm_br, SHM_BROKER, SHM_MODE_ADMIN, SHM_OPEN_ERR_MSG, t_broker_info::source_env, uw_get_error_code(), uw_get_os_error_code(), uw_shm_detach(), and uw_shm_open().
Referenced by main(), and uc_add().
Definition at line 1528 of file broker_admin_pub.c.
References t_broker_info::access_log, t_shm_appl_server::access_log, t_broker_info::access_log_max_size, t_shm_appl_server::access_log_max_size, t_broker_info::access_mode, t_shm_appl_server::access_mode, admin_err_msg, ALL_AS, ALL_PROXY, ALL_SHARD, t_broker_info::appl_server_hard_limit, t_shm_appl_server::appl_server_hard_limit, t_broker_info::appl_server_max_num, t_broker_info::appl_server_max_size, t_shm_appl_server::appl_server_max_size, APPL_SERVER_NUM_LIMIT, t_broker_info::appl_server_shm_id, t_shm_appl_server::as_info, assert, br_index, t_shm_broker::br_info, br_info_p, broker_create_dir(), BROKER_INFO_NAME_MAX, BROKER_PATH_MAX, t_broker_info::cache_user_info, t_shm_appl_server::cache_user_info, t_appl_server_info::cas_err_log_reset, t_appl_server_info::cas_log_reset, CAS_LOG_RESET_REOPEN, t_broker_info::cas_rctime, t_shm_appl_server::cas_rctime, t_appl_server_info::cas_slow_log_reset, t_broker_info::cci_pconnect, t_shm_appl_server::cci_pconnect, conf_get_value_access_mode(), conf_get_value_connect_order(), conf_get_value_keep_con(), conf_get_value_proxy_log_mode(), conf_get_value_sql_log_mode(), conf_get_value_table_on_off(), CONF_LOG_FILE_LEN, t_broker_info::connect_order, t_shm_appl_server::connect_order, t_appl_server_info::cur_slow_log_mode, t_appl_server_info::cur_sql_log_mode, DEFAULT_MAX_NUM_DELAYED_HOSTS_LOOKUP, t_broker_info::err_log_dir, t_shm_appl_server::err_log_dir, i, t_broker_info::jdbc_cache, t_shm_appl_server::jdbc_cache, t_broker_info::jdbc_cache_life_time, t_shm_appl_server::jdbc_cache_life_time, t_broker_info::jdbc_cache_only_hint, t_shm_appl_server::jdbc_cache_only_hint, t_broker_info::keep_connection, t_shm_appl_server::keep_connection, t_broker_info::log_backup, t_broker_info::log_dir, t_shm_appl_server::log_dir, t_broker_info::long_query_time, t_shm_appl_server::long_query_time, LONG_QUERY_TIME_LIMIT, t_broker_info::long_transaction_time, t_shm_appl_server::long_transaction_time, LONG_TRANSACTION_TIME_LIMIT, MAKE_FILEPATH, MAX_ACCESS_LOG_MAX_SIZE, t_broker_info::max_num_delayed_hosts_lookup, t_shm_appl_server::max_num_delayed_hosts_lookup, t_broker_info::max_prepared_stmt_count, t_shm_appl_server::max_prepared_stmt_count, MAX_PROXY_LOG_MAX_SIZE, MAX_QUERY_TIMEOUT_LIMIT, MAX_SQL_LOG_MAX_SIZE, MIN_MYSQL_KEEPALIVE_INTERVAL, t_broker_info::monitor_server_flag, t_shm_appl_server::monitor_server_flag, t_broker_info::mysql_keepalive_interval, t_shm_appl_server::mysql_keepalive_interval, t_broker_info::mysql_read_timeout, t_shm_appl_server::mysql_read_timeout, t_broker_info::name, NULL, t_shm_appl_server::num_appl_server, t_shm_broker::num_broker, OFF, ON, ONE_K, parse_int(), t_broker_info::preferred_hosts, t_shm_appl_server::preferred_hosts, t_broker_info::proxy_log_max_size, t_shm_appl_server::proxy_log_max_size, t_broker_info::proxy_log_mode, t_broker_info::proxy_shm_id, t_broker_info::query_timeout, t_shm_appl_server::query_timeout, t_appl_server_info::reset_flag, t_broker_info::service_flag, t_broker_info::session_timeout, t_shm_appl_server::session_timeout, t_broker_info::shard_flag, shard_shm_set_param_as_in_proxy(), shard_shm_set_param_proxy(), SHM_APPL_SERVER, SHM_APPL_SERVER_NAME_MAX, shm_as_p, shm_br, SHM_BROKER, SHM_MODE_ADMIN, SHM_OPEN_ERR_MSG, SHM_PROXY, t_broker_info::slow_log_dir, t_shm_appl_server::slow_log_dir, t_broker_info::slow_log_mode, t_shm_appl_server::slow_log_mode, t_broker_info::sql_log2, t_shm_appl_server::sql_log2, SQL_LOG2_MAX, t_broker_info::sql_log_max_size, t_shm_appl_server::sql_log_max_size, t_broker_info::sql_log_mode, t_shm_appl_server::sql_log_mode, t_broker_info::statement_pooling, t_shm_appl_server::statement_pooling, strlen, t_broker_info::time_to_kill, t_broker_info::trigger_action_flag, t_shm_appl_server::trigger_action_flag, TRUE, ut_cd_root_dir(), ut_cd_work_dir(), ut_size_string_to_kbyte(), ut_time_string_to_sec(), uw_get_error_code(), uw_get_os_error_code(), uw_shm_detach(), and uw_shm_open().
Referenced by main(), and uc_changer_internal().
int admin_del_cas_log | ( | int | master_shmid, |
const char * | broker, | ||
int | asid | ||
) |
Definition at line 2452 of file broker_admin_pub.c.
References t_broker_info::appl_server, t_broker_info::appl_server_max_num, t_broker_info::appl_server_shm_id, t_shm_appl_server::as_info, br_index, t_shm_broker::br_info, t_appl_server_info::cas_log_reset, CAS_LOG_RESET_REMOVE, error(), i, IS_NOT_APPL_SERVER_TYPE_CAS, t_broker_info::name, NULL, t_shm_broker::num_broker, t_appl_server_info::service_flag, SERVICE_ON, shm_appl, SHM_APPL_SERVER, shm_br, SHM_BROKER, SHM_MODE_ADMIN, uw_shm_detach(), and uw_shm_open().
Referenced by uc_del_cas_log().
int admin_drop_cmd | ( | int | , |
const char * | |||
) |
Definition at line 785 of file broker_admin_pub.c.
References admin_err_msg, t_broker_info::appl_server_num, t_broker_info::appl_server_shm_id, as_inactivate(), t_shm_appl_server::as_info, t_broker_info::auto_add_appl_server, br_index, t_shm_broker::br_info, i, t_broker_info::name, NULL, t_shm_appl_server::num_appl_server, t_shm_broker::num_broker, ON, t_appl_server_info::service_flag, SERVICE_OFF, SERVICE_OFF_ACK, t_broker_info::shard_flag, t_shm_appl_server::shard_flag, SHM_APPL_SERVER, shm_br, SHM_BROKER, SHM_MODE_ADMIN, SHM_OPEN_ERR_MSG, SLEEP_MILISEC, uw_get_error_code(), uw_get_os_error_code(), uw_shm_detach(), and uw_shm_open().
Referenced by main(), and uc_drop().
int admin_getid_cmd | ( | int | , |
int | , | ||
const char ** | |||
) |
Definition at line 1273 of file broker_admin_pub.c.
References admin_err_msg, appl_server_shm_id, t_broker_info::appl_server_shm_id, br_index, t_shm_broker::br_info, br_info_p, broker_name, BROKER_NAME_LEN, t_shard_conn::db_conn_info, t_shard_conn::db_name, error(), full_info_flag, getopt(), i, t_shard_key::key_column, make_sp_value(), makestring, t_shard_key_range::max, t_shard_key_range::min, t_broker_info::name, NULL, t_shm_broker::num_broker, t_shm_shard_conn::num_shard_conn, OFF, optarg, print_usage(), proxy_find_shard_id_by_hint_value(), t_broker_info::proxy_shm_id, register_fn_get_shard_key(), t_broker_info::service_flag, t_shm_shard_conn::shard_conn, t_broker_info::shard_flag, t_shard_key_range::shard_id, t_shard_conn::shard_id, t_shm_shard_key::shard_key, t_shm_proxy::shard_key_function_name, t_shm_proxy::shard_key_library_name, t_shm_proxy::shard_key_modular, shard_metadata_find_shard_range(), shard_metadata_get_conn(), shard_metadata_get_key(), shm_br, SHM_BROKER, shm_conn_p, shm_key_p, SHM_MODE_ADMIN, SHM_PROXY, uw_shm_detach(), and uw_shm_open().
Referenced by main().
int admin_info_cmd | ( | int | ) |
Definition at line 1194 of file broker_admin_pub.c.
References admin_err_msg, t_shm_broker::br_info, broker_config_dump(), NULL, t_shm_broker::num_broker, shm_br, SHM_BROKER, SHM_MODE_MONITOR, SHM_OPEN_ERR_MSG, uw_get_error_code(), uw_get_os_error_code(), uw_shm_detach(), and uw_shm_open().
Referenced by main().
void admin_init_env | ( | void | ) |
Definition at line 2509 of file broker_admin_pub.c.
References CLT_APPL_NAME_ENV_STR, CONTENT_LENGTH_ENV_STR, DELIMITER_ENV_STR, environ, i, NULL, OUT_FILE_NAME_ENV_STR, p, PATH_INFO_ENV_STR, QUERY_STRING_ENV_STR, REMOTE_ADDR_ENV_STR, REQUEST_METHOD_ENV_STR, SESSION_REQUEST_ENV_STR, SID_ENV_STR, and strlen.
Referenced by admin_common(), and main().
int admin_off_cmd | ( | int | , |
const char * | |||
) |
Definition at line 1002 of file broker_admin_pub.c.
References admin_err_msg, t_broker_info::appl_server_shm_id, br_inactivate(), t_shm_broker::br_info, i, t_broker_info::name, NULL, t_shm_broker::num_broker, OFF, ON, t_shm_broker::owner_uid, t_broker_info::proxy_shm_id, t_broker_info::service_flag, t_broker_info::shard_flag, shm_br, SHM_BROKER, SHM_MODE_ADMIN, SHM_OPEN_ERR_MSG, uw_get_error_code(), uw_get_os_error_code(), uw_shm_destroy(), uw_shm_detach(), and uw_shm_open().
Referenced by main(), and uc_off().
int admin_on_cmd | ( | int | , |
const char * | |||
) |
Definition at line 861 of file broker_admin_pub.c.
References access_control_set_shm(), admin_err_msg, ADMIN_ERR_MSG_SIZE, t_broker_info::appl_server_shm_id, br_activate(), br_inactivate(), t_shm_broker::br_info, BROKER_NAME_LEN, broker_shm_initialize_shm_as(), check_shard_conn(), get_upper_str(), i, t_broker_info::name, NULL, t_shm_broker::num_broker, OFF, ON, t_broker_info::proxy_shm_id, t_broker_info::service_flag, shard_db_password_env_str, t_broker_info::shard_flag, shard_shm_check_max_file_open_limit(), shard_shm_initialize_shm_proxy(), shm_as_p, shm_br, SHM_BROKER, SHM_MODE_ADMIN, SHM_OPEN_ERR_MSG, uw_get_error_code(), uw_get_os_error_code(), uw_shm_destroy(), uw_shm_detach(), and uw_shm_open().
Referenced by main(), and uc_on().
int admin_reset_cmd | ( | int | , |
const char * | |||
) |
Definition at line 1066 of file broker_admin_pub.c.
References admin_err_msg, t_broker_info::appl_server_max_num, APPL_SERVER_NUM_LIMIT, t_broker_info::appl_server_shm_id, t_shm_appl_server::as_info, t_shard_info::as_info_index_base, assert, br_index, t_shm_broker::br_info, FALSE, i, t_broker_info::name, NULL, t_shard_info::num_appl_server, t_shm_appl_server::num_appl_server, t_shm_broker::num_broker, t_shm_proxy::num_proxy, t_proxy_info::num_shard_conn, OFF, ON, proxy_info_p, t_broker_info::proxy_shm_id, t_appl_server_info::reset_flag, t_broker_info::service_flag, t_broker_info::shard_flag, shard_shm_find_proxy_info(), shard_shm_find_shard_info(), SHM_APPL_SERVER, shm_as_p, shm_br, SHM_BROKER, SHM_MODE_ADMIN, SHM_OPEN_ERR_MSG, SHM_PROXY, SLEEP_MILISEC, TRUE, uw_get_error_code(), uw_get_os_error_code(), uw_shm_detach(), and uw_shm_open().
Referenced by main().
int admin_restart_cmd | ( | int | , |
const char * | , | ||
int | |||
) |
Definition at line 594 of file broker_admin_pub.c.
References admin_err_msg, ADMIN_ERR_MSG_SIZE, t_broker_info::appl_server, t_broker_info::appl_server_max_num, t_shm_appl_server::appl_server_name, APPL_SERVER_NAME_MAX_SIZE, t_broker_info::appl_server_shm_id, APPL_SERVER_SHM_KEY_STR, t_shm_appl_server::as_info, br_index, t_shm_broker::br_info, t_appl_server_info::cas_clt_ip, t_appl_server_info::cas_clt_port, t_appl_server_info::clt_appl_name, t_appl_server_info::clt_req_path_info, t_appl_server_info::database_host, t_appl_server_info::database_name, t_appl_server_info::driver_version, environ, FALSE, free_env(), getsize(), i, IS_APPL_SERVER_TYPE_CAS, t_appl_server_info::last_access_time, t_appl_server_info::last_connect_time, make_env(), t_appl_server_info::mutex_flag, t_appl_server_info::mutex_turn, t_broker_info::name, NULL, t_shm_broker::num_broker, ON, t_appl_server_info::pid, pid, t_appl_server_info::psize, t_appl_server_info::psize_time, t_appl_server_info::reset_flag, t_appl_server_info::service_flag, SERVICE_ON, t_appl_server_info::service_ready_flag, t_broker_info::shard_flag, t_shm_appl_server::shard_flag, shm_appl, SHM_APPL_SERVER, shm_br, SHM_BROKER, SHM_MODE_ADMIN, SHM_MUTEX_ADMIN, SHM_MUTEX_BROKER, SHM_OPEN_ERR_MSG, SLEEP_SEC, snprintf_dots_truncate, t_broker_info::source_env, t_appl_server_info::transaction_start_time, TRUE, ut_is_appl_server_ready(), ut_kill_as_process(), t_appl_server_info::uts_status, UTS_STATUS_BUSY, UTS_STATUS_IDLE, uw_get_error_code(), uw_get_os_error_code(), uw_shm_detach(), and uw_shm_open().
Referenced by main(), and uc_restart().
int admin_start_cmd | ( | T_BROKER_INFO * | , |
int | , | ||
int | , | ||
bool | , | ||
char * | |||
) |
Definition at line 247 of file broker_admin_pub.c.
References access_control_set_shm(), admin_err_msg, ADMIN_ERR_MSG_SIZE, t_broker_info::appl_server_shm_id, br_activate(), br_inactivate(), t_shm_broker::br_info, broker_create_dir(), BROKER_NAME_LEN, BROKER_PATH_MAX, broker_shm_initialize_shm_as(), broker_shm_initialize_shm_broker(), check_shard_conn(), envvar_bindir_file(), FID_AS_PID_DIR, FID_CAS_TMP_DIR, FID_CUBRID_ERR_DIR, FID_SLOW_LOG_DIR, FID_SOCK_DIR, FID_SQL_LOG2_DIR, FID_SQL_LOG_DIR, FID_VAR_DIR, get_cubrid_file(), get_shard_db_password(), get_upper_str(), i, MASTER_SHM_KEY_ENV_STR, MEMBER_SIZE, t_broker_info::name, NULL, NUM_OF_DIGITS, OFF, ON, t_broker_info::proxy_shm_id, shard_db_password_env_str, t_broker_info::shard_flag, shard_shm_check_max_file_open_limit(), shard_shm_initialize_shm_proxy(), shm_as_p, shm_br, snprintf_dots_truncate, strlen, uw_shm_destroy(), and uw_shm_detach().
Referenced by main(), and uc_start().
int admin_stop_cmd | ( | int | ) |
Definition at line 458 of file broker_admin_pub.c.
References admin_err_msg, ADMIN_ERR_MSG_SIZE, t_broker_info::appl_server_shm_id, br_inactivate(), t_shm_broker::br_info, i, t_shm_broker::magic, MAX_BROKER_NUM, t_broker_info::name, NULL, t_shm_broker::num_broker, ON, t_shm_broker::owner_uid, t_broker_info::proxy_shm_id, t_broker_info::service_flag, t_broker_info::shard_flag, shm_br, SHM_BROKER, SHM_MODE_ADMIN, SHM_OPEN_ERR_MSG, uw_get_error_code(), uw_get_os_error_code(), uw_shm_destroy(), uw_shm_detach(), and uw_shm_open().
Referenced by main(), and uc_stop().
char admin_err_msg[] |
Definition at line 164 of file broker_admin_pub.c.
Referenced by admin_acl_reload_cmd(), admin_acl_status_cmd(), admin_add_cmd(), admin_conf_change(), admin_drop_cmd(), admin_getid_cmd(), admin_info_cmd(), admin_off_cmd(), admin_on_cmd(), admin_reset_cmd(), admin_restart_cmd(), admin_start_cmd(), admin_stop_cmd(), br_activate(), br_inactivate(), check_shard_conn(), main(), proxy_activate_internal(), shard_shm_check_max_file_open_limit(), shard_shm_set_param_as_in_proxy(), shard_shm_set_param_as_in_shard(), shard_shm_set_param_as_internal(), shard_shm_set_param_proxy(), and shard_shm_set_param_proxy_internal().