CUBRID Engine
latest
|
#include "config.h"
#include "broker_config.h"
#include "cas_protocol.h"
#include "shard_key.h"
#include "broker_shm.h"
Go to the source code of this file.
Functions | |
int | shard_metadata_initialize (T_BROKER_INFO *br_info, T_SHM_PROXY *shm_proxy_p) |
T_SHM_SHARD_USER * | shard_metadata_get_user (T_SHM_PROXY *shm_proxy_p) |
T_SHM_SHARD_KEY * | shard_metadata_get_key (T_SHM_PROXY *shm_proxy_p) |
T_SHM_SHARD_CONN * | shard_metadata_get_conn (T_SHM_PROXY *shm_proxy_p) |
void | shard_metadata_dump_internal (FILE *fp, T_SHM_PROXY *shm_proxy_p) |
void | shard_metadata_dump (FILE *fp, int shmid) |
T_SHARD_KEY * | shard_metadata_bsearch_key (T_SHM_SHARD_KEY *shm_key_p, const char *keycolumn) |
T_SHARD_KEY_RANGE * | shard_metadata_bsearch_range (T_SHARD_KEY *key_p, unsigned int hash_res) |
T_SHARD_KEY_RANGE * | shard_metadata_find_shard_range (T_SHM_SHARD_KEY *shm_key_p, const char *key, unsigned int hash_res) |
T_SHARD_USER * | shard_metadata_get_shard_user (T_SHM_SHARD_USER *shm_user_p) |
T_SHARD_USER * | shard_metadata_get_shard_user_from_shm (T_SHM_PROXY *shm_proxy_p) |
int | load_shard_key_function (const char *library_name, const char *function_name) |
void | close_shard_key_function (void) |
Variables | |
FN_GET_SHARD_KEY | fn_get_shard_key |
void close_shard_key_function | ( | void | ) |
Definition at line 934 of file shard_metadata.c.
References fn_get_shard_key, handle, and NULL.
Referenced by register_fn_get_shard_key(), and shard_metadata_validate_key_function().
Definition at line 909 of file shard_metadata.c.
References fn_get_shard_key, handle, and NULL.
Referenced by register_fn_get_shard_key(), and shard_metadata_validate_key_function().
T_SHARD_KEY* shard_metadata_bsearch_key | ( | T_SHM_SHARD_KEY * | shm_key_p, |
const char * | keycolumn | ||
) |
Definition at line 798 of file shard_metadata.c.
References t_shard_key::key_column, max, min, NULL, t_shm_shard_key::num_shard_key, and t_shm_shard_key::shard_key.
Referenced by shard_metadata_find_shard_range().
T_SHARD_KEY_RANGE* shard_metadata_bsearch_range | ( | T_SHARD_KEY * | key_p, |
unsigned int | hash_res | ||
) |
Definition at line 832 of file shard_metadata.c.
References max, t_shard_key_range::max, min, t_shard_key_range::min, NULL, t_shard_key::num_key_range, and t_shard_key::range.
Referenced by shard_metadata_find_shard_range().
void shard_metadata_dump | ( | FILE * | fp, |
int | shmid | ||
) |
Definition at line 596 of file shard_metadata.c.
References NULL, SHARD_ERR, shard_metadata_dump_internal(), SHM_MODE_MONITOR, SHM_PROXY, shm_proxy_p, uw_shm_detach(), and uw_shm_open().
Referenced by broker_config_dump().
void shard_metadata_dump_internal | ( | FILE * | fp, |
T_SHM_PROXY * | shm_proxy_p | ||
) |
Definition at line 566 of file shard_metadata.c.
References assert, shard_metadata_dump_conn(), shard_metadata_dump_key(), shard_metadata_dump_user(), shard_metadata_get_conn(), shard_metadata_get_key(), shard_metadata_get_user(), shm_conn_p, shm_key_p, and shm_user_p.
Referenced by shard_metadata_dump().
T_SHARD_KEY_RANGE* shard_metadata_find_shard_range | ( | T_SHM_SHARD_KEY * | shm_key_p, |
const char * | key, | ||
unsigned int | hash_res | ||
) |
Definition at line 865 of file shard_metadata.c.
References NULL, shard_metadata_bsearch_key(), and shard_metadata_bsearch_range().
Referenced by admin_getid_cmd(), proxy_get_range_by_param(), and shard_stmt_change_shard_val_to_id().
T_SHM_SHARD_CONN* shard_metadata_get_conn | ( | T_SHM_PROXY * | shm_proxy_p | ) |
Definition at line 426 of file shard_metadata.c.
References assert, shm_conn_p, and t_shm_proxy::shm_shard_conn.
Referenced by admin_getid_cmd(), metadata_monitor(), proxy_shm_initialize(), shard_metadata_dump_internal(), shard_metadata_read_conn(), shard_metadata_validate(), and shard_shm_initialize_shm_proxy().
T_SHM_SHARD_KEY* shard_metadata_get_key | ( | T_SHM_PROXY * | shm_proxy_p | ) |
Definition at line 414 of file shard_metadata.c.
References assert, shm_key_p, and t_shm_proxy::shm_shard_key.
Referenced by admin_getid_cmd(), metadata_monitor(), proxy_shm_initialize(), shard_metadata_dump_internal(), shard_metadata_read_key(), shard_metadata_validate(), and shard_shm_initialize_shm_proxy().
T_SHARD_USER* shard_metadata_get_shard_user | ( | T_SHM_SHARD_USER * | shm_user_p | ) |
Definition at line 877 of file shard_metadata.c.
References assert, NULL, t_shm_shard_user::num_shard_user, and t_shm_shard_user::shard_user.
Referenced by proxy_check_authorization().
T_SHARD_USER* shard_metadata_get_shard_user_from_shm | ( | T_SHM_PROXY * | shm_proxy_p | ) |
Definition at line 889 of file shard_metadata.c.
References assert, NULL, shard_metadata_get_user(), t_shm_shard_user::shard_user, and shm_user_p.
T_SHM_SHARD_USER* shard_metadata_get_user | ( | T_SHM_PROXY * | shm_proxy_p | ) |
Definition at line 402 of file shard_metadata.c.
References assert, t_shm_proxy::shm_shard_user, and shm_user_p.
Referenced by metadata_monitor(), proxy_shm_initialize(), shard_metadata_dump_internal(), shard_metadata_get_shard_user_from_shm(), shard_metadata_read_user(), and shard_metadata_validate().
int shard_metadata_initialize | ( | T_BROKER_INFO * | br_info, |
T_SHM_PROXY * | shm_proxy_p | ||
) |
Definition at line 438 of file shard_metadata.c.
References assert, t_broker_info::name, t_shm_shard_conn::num_shard_conn, t_shm_shard_key::num_shard_key, t_shm_shard_user::num_shard_user, t_broker_info::shard_connection_file, t_broker_info::shard_db_name, t_broker_info::shard_db_password, t_broker_info::shard_db_user, SHARD_INF, t_broker_info::shard_key_file, shard_metadata_dump_conn(), shard_metadata_dump_key(), shard_metadata_read_conn(), shard_metadata_read_key(), shard_metadata_read_user(), shard_metadata_sort_conn(), shard_metadata_sort_key(), shard_metadata_validate(), shm_conn_p, shm_key_p, t_shm_proxy::shm_shard_conn, t_shm_proxy::shm_shard_key, and shm_user_p.
Referenced by shard_shm_initialize_shm_proxy().
FN_GET_SHARD_KEY fn_get_shard_key |
Definition at line 62 of file shard_metadata.c.
Referenced by close_shard_key_function(), load_shard_key_function(), and register_fn_get_shard_key().