CUBRID Engine  latest
oid.c File Reference
#include "config.h"
#include <assert.h>
#include "oid.h"
#include "transform.h"
Include dependency graph for oid.c:

Go to the source code of this file.

Classes

struct  oid_cache_entry
 

Typedefs

typedef struct oid_cache_entry OID_CACHE_ENTRY
 

Functions

void oid_set_root (const OID *oid)
 
bool oid_is_root (const OID *oid)
 
void oid_set_serial (const OID *oid)
 
bool oid_is_serial (const OID *oid)
 
void oid_get_serial_oid (OID *oid)
 
void oid_set_partition (const OID *oid)
 
bool oid_is_partition (const OID *oid)
 
void oid_get_partition_oid (OID *oid)
 
bool oid_is_db_class (const OID *oid)
 
bool oid_is_db_attribute (const OID *oid)
 
int oid_compare (const void *a, const void *b)
 
unsigned int oid_hash (const void *key_oid, unsigned int htsize)
 
int oid_compare_equals (const void *key_oid1, const void *key_oid2)
 
bool oid_check_cached_class_oid (const int cache_id, const OID *oid)
 
void oid_set_cached_class_oid (const int cache_id, const OID *oid)
 
const char * oid_get_cached_class_name (const int cache_id)
 
bool oid_is_cached_class_oid (const OID *class_oid)
 
OIDoid_get_rep_read_tran_oid (void)
 
bool oid_is_system_class (const OID *class_oid)
 

Variables

static OID oid_Root_class = { 0, 0, 0 }
 
static OID oid_Serial_class = { 0, 0, 0 }
 
static OID oid_Partition_class = { 0, 0, 0 }
 
static OID oid_Collation_class = { 0, 0, 0 }
 
static OID oid_HA_apply_info_class = { 0, 0, 0 }
 
static OID oid_Class_class = { 0, 0, 0 }
 
static OID oid_Attribute_class = { 0, 0, 0 }
 
static OID oid_Domain_class = { 0, 0, 0 }
 
static OID oid_Method_class = { 0, 0, 0 }
 
static OID oid_Methsig_class = { 0, 0, 0 }
 
static OID oid_Metharg_class = { 0, 0, 0 }
 
static OID oid_Methfile_class = { 0, 0, 0 }
 
static OID oid_Queryspec_class = { 0, 0, 0 }
 
static OID oid_Index_class = { 0, 0, 0 }
 
static OID oid_Indexkey_class = { 0, 0, 0 }
 
static OID oid_Datatype_class = { 0, 0, 0 }
 
static OID oid_Classauth_class = { 0, 0, 0 }
 
static OID oid_Stored_proc_class = { 0, 0, 0 }
 
static OID oid_Stored_proc_args_class = { 0, 0, 0 }
 
static OID oid_Charset_class = { 0, 0, 0 }
 
static OID oid_Trigger_class = { 0, 0, 0 }
 
static OID oid_User_class = { 0, 0, 0 }
 
static OID oid_Password_class = { 0, 0, 0 }
 
static OID oid_Authorization_class = { 0, 0, 0 }
 
static OID oid_Authorizations_class = { 0, 0, 0 }
 
static OID oid_DB_root_class = { 0, 0, 0 }
 
static OID oid_Rep_Read_Tran = { 0, (short int) 0x8000, 0 }
 
const OID oid_Null_oid = { NULL_PAGEID, NULL_SLOTID, NULL_VOLID }
 
PAGEID oid_Next_tempid = NULL_PAGEID
 
OIDoid_Root_class_oid = &oid_Root_class
 
OIDoid_Serial_class_oid = &oid_Serial_class
 
OIDoid_Partition_class_oid = &oid_Partition_class
 
OIDoid_User_class_oid = &oid_User_class
 
OID_CACHE_ENTRY oid_Cache [OID_CACHE_SIZE]
 

Typedef Documentation

Definition at line 32 of file oid.c.

Function Documentation

bool oid_check_cached_class_oid ( const int  cache_id,
const OID oid 
)

Definition at line 327 of file oid.c.

References OID_EQ.

Referenced by logtb_check_class_for_rr_isolation_err(), mvcc_is_mvcc_disabled_class(), qexec_open_scan(), and qo_is_non_mvcc_class_with_index().

Here is the caller graph for this function:

int oid_compare_equals ( const void *  key_oid1,
const void *  key_oid2 
)
const char* oid_get_cached_class_name ( const int  cache_id)

Definition at line 351 of file oid.c.

References oid_cache_entry::class_name.

Referenced by catcls_find_and_set_cached_class_oid().

Here is the caller graph for this function:

void oid_get_partition_oid ( OID oid)

Definition at line 207 of file oid.c.

References COPY_OID.

OID* oid_get_rep_read_tran_oid ( void  )

Definition at line 386 of file oid.c.

References oid_Rep_Read_Tran.

Referenced by lock_demote_class_lock(), lock_rep_read_tran(), and lock_wait_state_to_string().

Here is the caller graph for this function:

void oid_get_serial_oid ( OID oid)
unsigned int oid_hash ( const void *  key_oid,
unsigned int  htsize 
)
bool oid_is_cached_class_oid ( const OID class_oid)

Definition at line 364 of file oid.c.

References i, oid_cache_entry::oid, OID_CACHE_ROOT_CLASS_ID, OID_CACHE_SIZE, and OID_EQ.

Referenced by oid_is_system_class().

Here is the caller graph for this function:

bool oid_is_db_attribute ( const OID oid)

Definition at line 231 of file oid.c.

References OID_EQ.

bool oid_is_db_class ( const OID oid)

Definition at line 219 of file oid.c.

References OID_EQ.

Referenced by btree_key_find_and_insert_delete_mvccid(), and btree_key_insert_new_object().

Here is the caller graph for this function:

bool oid_is_partition ( const OID oid)

Definition at line 195 of file oid.c.

References OID_EQ.

bool oid_is_root ( const OID oid)

Definition at line 135 of file oid.c.

References OID_EQ.

Referenced by heap_get_referenced_by(), and tf_disk_to_class().

Here is the caller graph for this function:

bool oid_is_serial ( const OID oid)

Definition at line 159 of file oid.c.

References OID_EQ.

Referenced by btree_physical_delete(), mvcc_is_mvcc_disabled_class(), qexec_open_scan(), scan_next_heap_scan(), and scan_next_index_lookup_heap().

Here is the caller graph for this function:

bool oid_is_system_class ( const OID class_oid)

Definition at line 400 of file oid.c.

References assert, NULL, oid_is_cached_class_oid(), and OID_ISNULL.

Referenced by heap_prepare_get_context().

Here is the caller graph for this function:

void oid_set_cached_class_oid ( const int  cache_id,
const OID oid 
)

Definition at line 339 of file oid.c.

References COPY_OID.

Referenced by boot_client_find_and_cache_class_oids(), and catcls_find_and_set_cached_class_oid().

Here is the caller graph for this function:

void oid_set_partition ( const OID oid)

Definition at line 183 of file oid.c.

References COPY_OID.

void oid_set_root ( const OID oid)
void oid_set_serial ( const OID oid)

Definition at line 147 of file oid.c.

References COPY_OID.

Variable Documentation

OID oid_Attribute_class = { 0, 0, 0 }
static

Definition at line 45 of file oid.c.

OID oid_Authorization_class = { 0, 0, 0 }
static

Definition at line 62 of file oid.c.

OID oid_Authorizations_class = { 0, 0, 0 }
static

Definition at line 63 of file oid.c.

Initial value:
= {
}
#define CT_ATTRIBUTE_NAME
Definition: transform.h:120
static OID oid_User_class
Definition: oid.c:60
#define CT_DATATYPE_NAME
Definition: transform.h:131
#define CT_CLASSAUTH_NAME
Definition: transform.h:130
static OID oid_Indexkey_class
Definition: oid.c:53
#define CT_METHOD_NAME
Definition: transform.h:122
static OID oid_Serial_class
Definition: oid.c:40
#define CT_AUTHORIZATIONS_NAME
Definition: transform.h:143
static OID oid_Attribute_class
Definition: oid.c:45
static OID oid_Method_class
Definition: oid.c:47
#define CT_DOMAIN_NAME
Definition: transform.h:121
#define CT_METHSIG_NAME
Definition: transform.h:123
static OID oid_Domain_class
Definition: oid.c:46
#define CT_AUTHORIZATION_NAME
Definition: transform.h:142
static OID oid_Datatype_class
Definition: oid.c:54
#define CT_STORED_PROC_NAME
Definition: transform.h:132
#define CT_METHFILE_NAME
Definition: transform.h:125
#define CT_CLASS_NAME
Definition: transform.h:119
#define CT_PARTITION_NAME
Definition: transform.h:134
#define CT_SERIAL_NAME
Definition: transform.h:135
static OID oid_Trigger_class
Definition: oid.c:59
static OID oid_Stored_proc_args_class
Definition: oid.c:57
#define CT_STORED_PROC_ARGS_NAME
Definition: transform.h:133
#define CT_HA_APPLY_INFO_NAME
Definition: transform.h:136
static OID oid_HA_apply_info_class
Definition: oid.c:43
static OID oid_Collation_class
Definition: oid.c:42
static OID oid_Stored_proc_class
Definition: oid.c:56
#define CT_USER_NAME
Definition: transform.h:138
static OID oid_Partition_class
Definition: oid.c:41
#define CT_INDEX_NAME
Definition: transform.h:128
#define NULL
Definition: freelistheap.h:34
#define CT_METHARG_NAME
Definition: transform.h:124
#define CT_QUERYSPEC_NAME
Definition: transform.h:126
static OID oid_Charset_class
Definition: oid.c:58
#define CT_COLLATION_NAME
Definition: transform.h:137
static OID oid_DB_root_class
Definition: oid.c:64
static OID oid_Authorizations_class
Definition: oid.c:63
#define CT_TRIGGER_NAME
Definition: transform.h:139
static OID oid_Index_class
Definition: oid.c:52
static OID oid_Root_class
Definition: oid.c:39
#define CT_INDEXKEY_NAME
Definition: transform.h:129
static OID oid_Class_class
Definition: oid.c:44
static OID oid_Authorization_class
Definition: oid.c:62
static OID oid_Password_class
Definition: oid.c:61
#define CT_ROOT_NAME
Definition: transform.h:140
static OID oid_Queryspec_class
Definition: oid.c:51
#define CT_PASSWORD_NAME
Definition: transform.h:141
static OID oid_Methfile_class
Definition: oid.c:50
static OID oid_Methsig_class
Definition: oid.c:48
static OID oid_Classauth_class
Definition: oid.c:55
static OID oid_Metharg_class
Definition: oid.c:49
#define CT_CHARSET_NAME
Definition: transform.h:144

Definition at line 81 of file oid.c.

OID oid_Charset_class = { 0, 0, 0 }
static

Definition at line 58 of file oid.c.

OID oid_Class_class = { 0, 0, 0 }
static

Definition at line 44 of file oid.c.

OID oid_Classauth_class = { 0, 0, 0 }
static

Definition at line 55 of file oid.c.

OID oid_Collation_class = { 0, 0, 0 }
static

Definition at line 42 of file oid.c.

OID oid_Datatype_class = { 0, 0, 0 }
static

Definition at line 54 of file oid.c.

OID oid_DB_root_class = { 0, 0, 0 }
static

Definition at line 64 of file oid.c.

OID oid_Domain_class = { 0, 0, 0 }
static

Definition at line 46 of file oid.c.

OID oid_HA_apply_info_class = { 0, 0, 0 }
static

Definition at line 43 of file oid.c.

OID oid_Index_class = { 0, 0, 0 }
static

Definition at line 52 of file oid.c.

OID oid_Indexkey_class = { 0, 0, 0 }
static

Definition at line 53 of file oid.c.

OID oid_Metharg_class = { 0, 0, 0 }
static

Definition at line 49 of file oid.c.

OID oid_Methfile_class = { 0, 0, 0 }
static

Definition at line 50 of file oid.c.

OID oid_Method_class = { 0, 0, 0 }
static

Definition at line 47 of file oid.c.

OID oid_Methsig_class = { 0, 0, 0 }
static

Definition at line 48 of file oid.c.

PAGEID oid_Next_tempid = NULL_PAGEID

Definition at line 70 of file oid.c.

OID oid_Partition_class = { 0, 0, 0 }
static

Definition at line 41 of file oid.c.

OID* oid_Partition_class_oid = &oid_Partition_class

Definition at line 77 of file oid.c.

OID oid_Password_class = { 0, 0, 0 }
static

Definition at line 61 of file oid.c.

OID oid_Queryspec_class = { 0, 0, 0 }
static

Definition at line 51 of file oid.c.

OID oid_Rep_Read_Tran = { 0, (short int) 0x8000, 0 }
static

Definition at line 66 of file oid.c.

Referenced by oid_get_rep_read_tran_oid().

OID oid_Root_class = { 0, 0, 0 }
static

Definition at line 39 of file oid.c.

Referenced by oid_set_root().

OID* oid_Root_class_oid = &oid_Root_class

Definition at line 73 of file oid.c.

Referenced by boot_compact_db(), boot_db_parm_update_heap(), btree_check_all(), btree_check_by_class_oid(), btree_check_locking_for_delete_unique(), btree_check_locking_for_insert_unique(), btree_load_check_fk(), btree_repair_prev_link(), btree_repair_prev_link_by_class_oid(), catalog_check_consistency(), catalog_create(), catalog_dump(), catalog_end_access_with_dir_oid(), catalog_get_cardinality_by_name(), file_tracker_check(), file_tracker_get_and_protect(), file_tracker_interruptable_iterate(), cubload::server_object_loader::flush_records(), heap_check_all_heaps(), heap_check_heap_file(), heap_compact_pages(), heap_does_exist(), heap_get_class_oid_from_page(), heap_get_class_record(), heap_insert_logical(), heap_is_object_not_null(), heap_prepare_get_context(), heap_scancache_start_modify(), cubload::server_object_loader::init(), is_class(), locator_add_root(), locator_all_reference_lockset(), locator_attribute_info_force(), locator_check_all_entries_of_all_btrees(), locator_check_by_class_oid(), locator_check_class_names(), locator_defence_drop_class_name_entry(), locator_force_for_multi_update(), locator_is_exist_class_name_entry(), locator_multi_insert_force(), locator_permoid_class_name(), lock_add_composite_lock(), lock_classes_lock_hint(), lock_get_class_lock(), lock_get_object_lock(), lock_has_lock_on_object(), lock_object(), lock_scan(), lock_unlock_all_shared_get_all_exclusive(), qexec_execute_insert(), qexec_execute_selupd_list(), qexec_for_update_set_class_locks(), qexec_set_class_locks(), sbtree_load_index(), sm_init(), tde_update_keyinfo(), xboot_checkdb_table(), xbtree_find_unique(), xbtree_load_online_index(), xcache_find_xasl_id_for_execute(), xchksum_insert_repl_log_and_demote_table_lock(), xlocator_delete_class_name(), xlocator_fetch(), xlocator_fetch_all(), xlocator_fetch_lockhint_classes(), xlocator_fetch_lockset(), xlocator_find_class_oid(), xlocator_find_lockhint_class_oids(), xlocator_force(), xlocator_get_class(), xlocator_lock_and_fetch_all(), xlocator_reserve_class_name(), xstats_get_statistics_from_server(), xstats_update_all_statistics(), and xstats_update_statistics().

OID oid_Serial_class = { 0, 0, 0 }
static

Definition at line 40 of file oid.c.

OID oid_Stored_proc_args_class = { 0, 0, 0 }
static

Definition at line 57 of file oid.c.

OID oid_Stored_proc_class = { 0, 0, 0 }
static

Definition at line 56 of file oid.c.

OID oid_Trigger_class = { 0, 0, 0 }
static

Definition at line 59 of file oid.c.

OID oid_User_class = { 0, 0, 0 }
static

Definition at line 60 of file oid.c.

OID* oid_User_class_oid = &oid_User_class

Definition at line 78 of file oid.c.

Referenced by heap_prepare_get_context().