CUBRID Engine  latest
shard_metadata.h File Reference
#include "config.h"
#include "broker_config.h"
#include "cas_protocol.h"
#include "shard_key.h"
#include "broker_shm.h"
Include dependency graph for shard_metadata.h:
This graph shows which files directly or indirectly include this file:

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_USERshard_metadata_get_user (T_SHM_PROXY *shm_proxy_p)
 
T_SHM_SHARD_KEYshard_metadata_get_key (T_SHM_PROXY *shm_proxy_p)
 
T_SHM_SHARD_CONNshard_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_KEYshard_metadata_bsearch_key (T_SHM_SHARD_KEY *shm_key_p, const char *keycolumn)
 
T_SHARD_KEY_RANGEshard_metadata_bsearch_range (T_SHARD_KEY *key_p, unsigned int hash_res)
 
T_SHARD_KEY_RANGEshard_metadata_find_shard_range (T_SHM_SHARD_KEY *shm_key_p, const char *key, unsigned int hash_res)
 
T_SHARD_USERshard_metadata_get_shard_user (T_SHM_SHARD_USER *shm_user_p)
 
T_SHARD_USERshard_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
 

Function Documentation

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

Here is the caller graph for this function:

int load_shard_key_function ( const char *  library_name,
const char *  function_name 
)

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

Here is the caller graph for this 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().

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

void shard_metadata_dump_internal ( FILE *  fp,
T_SHM_PROXY shm_proxy_p 
)
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().

Here is the caller graph for this function:

T_SHM_SHARD_CONN* shard_metadata_get_conn ( T_SHM_PROXY shm_proxy_p)
T_SHM_SHARD_KEY* shard_metadata_get_key ( T_SHM_PROXY shm_proxy_p)
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().

Here is the caller graph for this function:

T_SHARD_USER* shard_metadata_get_shard_user_from_shm ( T_SHM_PROXY shm_proxy_p)
T_SHM_SHARD_USER* shard_metadata_get_user ( T_SHM_PROXY shm_proxy_p)

Variable Documentation