File catalog_class.c
FileList > cubrid > src > storage > catalog_class.c
Go to the source code of this file
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "catalog_class.h"
#include "system_catalog.h"
#include "btree.h"
#include "deduplicate_key.h"
#include "error_manager.h"
#include "heap_file.h"
#include "transform.h"
#include "set_object.h"
#include "locator_sr.h"
#include "xserver_interface.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "query_dump.h"
#include "tz_support.h"
#include "db_date.h"
#include "dbtype.h"
#include "string_opfunc.h"
#include "thread_manager.hpp"
#include "storage_common.h"
#include "memory_wrapper.hpp"
Classes
Public Types
Public Attributes
Public Static Attributes
Public Functions
| Type |
Name |
| int |
catcls_compile_catalog_classes (THREAD_ENTRY * thread_p)
|
| int |
catcls_delete_catalog_classes (THREAD_ENTRY * thread_p, const char * name_p, OID * class_oid_p)
|
| int |
catcls_finalize_class_oid_to_oid_hash_table (THREAD_ENTRY * thread_p)
|
| int |
catcls_find_and_set_cached_class_oid (THREAD_ENTRY * thread_p)
|
| int |
catcls_get_apply_info_log_record_time (THREAD_ENTRY * thread_p, time_t * log_record_time)
|
| int |
catcls_get_db_collation (THREAD_ENTRY * thread_p, LANG_COLL_COMPAT ** db_collations, int * coll_cnt)
|
| int |
catcls_get_server_compat_info (THREAD_ENTRY * thread_p, INTL_CODESET * charset_id_p, char * lang_buf, const int lang_buf_size, char * timezone_checksum)
|
| int |
catcls_insert_catalog_classes (THREAD_ENTRY * thread_p, RECDES * record_p)
|
| int |
catcls_remove_entry (THREAD_ENTRY * thread_p, OID * class_oid_p)
|
| int |
catcls_update_catalog_classes (THREAD_ENTRY * thread_p, const char * name_p, RECDES * record_p, OID * class_oid_p, UPDATE_INPLACE_STYLE force_in_place)
|
| int |
catcls_update_class_stats (THREAD_ENTRY * thread_p, const char * class_name, unsigned int ci_time_stamp, bool with_fullscan)
|
Public Static Functions
| Type |
Name |
| CATCLS_ENTRY * |
catcls_allocate_entry (THREAD_ENTRY * thread_p)
|
| OR_VALUE * |
catcls_allocate_or_value (int size)
|
| void |
catcls_apply_component_type (OR_VALUE * value_p, int type)
|
| void |
catcls_apply_resolutions (OR_VALUE * value_p, OR_VALUE * resolution_p)
|
| int |
catcls_cache_fixed_attr_indexes (THREAD_ENTRY * thread_p)
|
| int |
catcls_convert_attr_id_to_name (THREAD_ENTRY * thread_p, OR_BUF * orbuf_p, OR_VALUE * value_p)
|
| int |
catcls_convert_class_oid_to_oid (THREAD_ENTRY * thread_p, DB_VALUE * oid_val)
|
| void |
catcls_copy_or_value_times_and_statistics (OR_VALUE * value_p, OR_VALUE * old_value_p)
|
| int |
catcls_delete_instance (THREAD_ENTRY * thread_p, OID * oid, OID * class_oid, HFID * hfid, HEAP_SCANCACHE * scan)
|
| int |
catcls_delete_subset (THREAD_ENTRY * thread_p, OR_VALUE * value_p)
|
| int |
catcls_expand_or_value_by_def (OR_VALUE * value_p, CT_CLASS * def)
|
| int |
catcls_expand_or_value_by_repr (OR_VALUE * value_p, OID * class_oid, DISK_REPR * rep)
|
| int |
catcls_expand_or_value_by_subset (THREAD_ENTRY * thread_p, OR_VALUE * value_p)
|
| int |
catcls_find_btid_of_class_name (THREAD_ENTRY * thread_p, BTID * btid)
|
| int |
catcls_find_class_oid_by_class_name (THREAD_ENTRY * thread_p, const char * name, OID * class_oid)
|
| OID * |
catcls_find_oid (THREAD_ENTRY * thread_p, OID * class_oid)
|
| int |
catcls_find_oid_by_class_name (THREAD_ENTRY * thread_p, const char * name, OID * oid)
|
| int |
catcls_free_entry (CATCLS_ENTRY * entry_p)
|
| int |
catcls_free_entry_kv (const void * key, void * data, void * args)
|
| void |
catcls_free_or_value (OR_VALUE * value)
|
| void |
catcls_free_sub_value (OR_VALUE * values, int count)
|
| int |
catcls_get_object_set (THREAD_ENTRY * thread_p, OR_BUF * buf_p, int expected_size, OR_VALUE * value)
|
| int |
catcls_get_or_value_from_attribute (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| int |
catcls_get_or_value_from_attrid (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| int |
catcls_get_or_value_from_buffer (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p, DISK_REPR * rep)
|
| int |
catcls_get_or_value_from_class (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| OR_VALUE * |
catcls_get_or_value_from_class_record (THREAD_ENTRY * thread_p, RECDES * record)
|
| int |
catcls_get_or_value_from_domain (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| int |
catcls_get_or_value_from_indexes (DB_SEQ * seq, OR_VALUE * subset, int is_unique, int is_reverse, int is_primary_key, int is_foreign_key)
|
| int |
catcls_get_or_value_from_method (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| int |
catcls_get_or_value_from_method_argument (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| int |
catcls_get_or_value_from_method_file (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| int |
catcls_get_or_value_from_method_signiture (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| int |
catcls_get_or_value_from_partition (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| int |
catcls_get_or_value_from_query_spec (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| OR_VALUE * |
catcls_get_or_value_from_record (THREAD_ENTRY * thread_p, RECDES * record, OID * class_oid)
|
| int |
catcls_get_or_value_from_resolution (THREAD_ENTRY * thread_p, OR_BUF * buf_p, OR_VALUE * value_p)
|
| int |
catcls_get_property_set (THREAD_ENTRY * thread_p, OR_BUF * buf_p, int expected_size, OR_VALUE * value_p)
|
| int |
catcls_get_subset (THREAD_ENTRY * thread_p, OR_BUF * buf_p, int expected_size, OR_VALUE * value_p, CREADER reader)
|
| int |
catcls_guess_record_length (OR_VALUE * value_p)
|
| int |
catcls_initialize_class_oid_to_oid_hash_table (THREAD_ENTRY * thread_p, int num_entry)
|
| int |
catcls_insert_instance (THREAD_ENTRY * thread_p, OR_VALUE * value_p, OID * oid, OID * root_oid, OID * class_oid, HFID * hfid, HEAP_SCANCACHE * scan)
|
| int |
catcls_insert_subset (THREAD_ENTRY * thread_p, OR_VALUE * value_p, OID * root_oid)
|
| int |
catcls_put_entry (THREAD_ENTRY * thread_p, CATCLS_ENTRY * entry, bool * already_exists)
|
| int |
catcls_put_or_value_into_buffer (OR_VALUE * value_p, int chn, OR_BUF * buf_p, OID * class_oid, DISK_REPR * rep)
|
| int |
catcls_put_or_value_into_record (THREAD_ENTRY * thread_p, OR_VALUE * value_p, int chn, RECDES * record, OID * class_oid)
|
| int |
catcls_reorder_attributes_by_repr (THREAD_ENTRY * thread_p, OR_VALUE * value_p)
|
| int |
catcls_replace_entry_oid (THREAD_ENTRY * thread_p, OID * entry_class_oid, OID * entry_new_oid)
|
| int |
catcls_resolution_space (int name_space)
|
| void |
catcls_set_or_value_timestamps (OR_VALUE * value_p)
|
| char * |
catcls_unpack_allocator (int size)
|
| int |
catcls_update_instance (THREAD_ENTRY * thread_p, OR_VALUE * value_p, OID * oid, OID * class_oid, HFID * hfid, HEAP_SCANCACHE * scan, UPDATE_INPLACE_STYLE force_in_place)
|
| void |
catcls_update_or_value_class_stats_fields (OR_VALUE * value_p, unsigned int ci_time_stamp, bool with_fullscan)
|
| void |
catcls_update_or_value_updated_time (OR_VALUE * value_p)
|
| int |
catcls_update_subset (THREAD_ENTRY * thread_p, OR_VALUE * value_p, OR_VALUE * old_value, bool * uflag, UPDATE_INPLACE_STYLE force_in_place)
|
Macros
Public Types Documentation
typedef CATCLS_ENTRY
typedef struct catcls_entry CATCLS_ENTRY;
typedef CATCLS_PROPERTY
typedef struct catcls_property CATCLS_PROPERTY;
typedef CREADER
typedef int(* CREADER) (THREAD_ENTRY *thread_p, OR_BUF *buf, OR_VALUE *value_p);
typedef OR_VALUE
typedef struct or_value OR_VALUE;
union or_id
Public Attributes Documentation
variable catcls_Enable
Public Static Attributes Documentation
variable _gv_ct_Class_checked_time_idx
int _gv_ct_Class_checked_time_idx;
variable _gv_ct_Class_created_time_idx
int _gv_ct_Class_created_time_idx;
variable _gv_ct_Class_statistics_strategy_idx
int _gv_ct_Class_statistics_strategy_idx;
variable _gv_ct_Class_updated_time_idx
int _gv_ct_Class_updated_time_idx;
variable _gv_ct_Index_created_time_idx
int _gv_ct_Index_created_time_idx;
variable _gv_ct_Index_updated_time_idx
int _gv_ct_Index_updated_time_idx;
variable catcls_Btid
variable catcls_Class_oid_to_oid_hash_table
MHT_TABLE* catcls_Class_oid_to_oid_hash_table;
variable catcls_Free_entry_list
CATCLS_ENTRY* catcls_Free_entry_list;
Public Functions Documentation
function catcls_compile_catalog_classes
int catcls_compile_catalog_classes (
THREAD_ENTRY * thread_p
)
function catcls_delete_catalog_classes
int catcls_delete_catalog_classes (
THREAD_ENTRY * thread_p,
const char * name_p,
OID * class_oid_p
)
function catcls_finalize_class_oid_to_oid_hash_table
int catcls_finalize_class_oid_to_oid_hash_table (
THREAD_ENTRY * thread_p
)
function catcls_find_and_set_cached_class_oid
int catcls_find_and_set_cached_class_oid (
THREAD_ENTRY * thread_p
)
function catcls_get_apply_info_log_record_time
int catcls_get_apply_info_log_record_time (
THREAD_ENTRY * thread_p,
time_t * log_record_time
)
function catcls_get_db_collation
int catcls_get_db_collation (
THREAD_ENTRY * thread_p,
LANG_COLL_COMPAT ** db_collations,
int * coll_cnt
)
function catcls_get_server_compat_info
int catcls_get_server_compat_info (
THREAD_ENTRY * thread_p,
INTL_CODESET * charset_id_p,
char * lang_buf,
const int lang_buf_size,
char * timezone_checksum
)
function catcls_insert_catalog_classes
int catcls_insert_catalog_classes (
THREAD_ENTRY * thread_p,
RECDES * record_p
)
function catcls_remove_entry
int catcls_remove_entry (
THREAD_ENTRY * thread_p,
OID * class_oid_p
)
function catcls_update_catalog_classes
int catcls_update_catalog_classes (
THREAD_ENTRY * thread_p,
const char * name_p,
RECDES * record_p,
OID * class_oid_p,
UPDATE_INPLACE_STYLE force_in_place
)
function catcls_update_class_stats
int catcls_update_class_stats (
THREAD_ENTRY * thread_p,
const char * class_name,
unsigned int ci_time_stamp,
bool with_fullscan
)
Public Static Functions Documentation
function catcls_allocate_entry
static CATCLS_ENTRY * catcls_allocate_entry (
THREAD_ENTRY * thread_p
)
function catcls_allocate_or_value
static OR_VALUE * catcls_allocate_or_value (
int size
)
function catcls_apply_component_type
static void catcls_apply_component_type (
OR_VALUE * value_p,
int type
)
function catcls_apply_resolutions
static void catcls_apply_resolutions (
OR_VALUE * value_p,
OR_VALUE * resolution_p
)
function catcls_cache_fixed_attr_indexes
static int catcls_cache_fixed_attr_indexes (
THREAD_ENTRY * thread_p
)
function catcls_convert_attr_id_to_name
static int catcls_convert_attr_id_to_name (
THREAD_ENTRY * thread_p,
OR_BUF * orbuf_p,
OR_VALUE * value_p
)
function catcls_convert_class_oid_to_oid
static int catcls_convert_class_oid_to_oid (
THREAD_ENTRY * thread_p,
DB_VALUE * oid_val
)
function catcls_copy_or_value_times_and_statistics
static void catcls_copy_or_value_times_and_statistics (
OR_VALUE * value_p,
OR_VALUE * old_value_p
)
function catcls_delete_instance
static int catcls_delete_instance (
THREAD_ENTRY * thread_p,
OID * oid,
OID * class_oid,
HFID * hfid,
HEAP_SCANCACHE * scan
)
function catcls_delete_subset
static int catcls_delete_subset (
THREAD_ENTRY * thread_p,
OR_VALUE * value_p
)
function catcls_expand_or_value_by_def
static int catcls_expand_or_value_by_def (
OR_VALUE * value_p,
CT_CLASS * def
)
function catcls_expand_or_value_by_repr
static int catcls_expand_or_value_by_repr (
OR_VALUE * value_p,
OID * class_oid,
DISK_REPR * rep
)
function catcls_expand_or_value_by_subset
static int catcls_expand_or_value_by_subset (
THREAD_ENTRY * thread_p,
OR_VALUE * value_p
)
function catcls_find_btid_of_class_name
static int catcls_find_btid_of_class_name (
THREAD_ENTRY * thread_p,
BTID * btid
)
function catcls_find_class_oid_by_class_name
static int catcls_find_class_oid_by_class_name (
THREAD_ENTRY * thread_p,
const char * name,
OID * class_oid
)
function catcls_find_oid
static OID * catcls_find_oid (
THREAD_ENTRY * thread_p,
OID * class_oid
)
function catcls_find_oid_by_class_name
static int catcls_find_oid_by_class_name (
THREAD_ENTRY * thread_p,
const char * name,
OID * oid
)
function catcls_free_entry
static int catcls_free_entry (
CATCLS_ENTRY * entry_p
)
function catcls_free_entry_kv
static int catcls_free_entry_kv (
const void * key,
void * data,
void * args
)
function catcls_free_or_value
static void catcls_free_or_value (
OR_VALUE * value
)
function catcls_free_sub_value
static void catcls_free_sub_value (
OR_VALUE * values,
int count
)
function catcls_get_object_set
static int catcls_get_object_set (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
int expected_size,
OR_VALUE * value
)
function catcls_get_or_value_from_attribute
static int catcls_get_or_value_from_attribute (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_or_value_from_attrid
static int catcls_get_or_value_from_attrid (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_or_value_from_buffer
static int catcls_get_or_value_from_buffer (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p,
DISK_REPR * rep
)
function catcls_get_or_value_from_class
static int catcls_get_or_value_from_class (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_or_value_from_class_record
static OR_VALUE * catcls_get_or_value_from_class_record (
THREAD_ENTRY * thread_p,
RECDES * record
)
function catcls_get_or_value_from_domain
static int catcls_get_or_value_from_domain (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_or_value_from_indexes
static int catcls_get_or_value_from_indexes (
DB_SEQ * seq,
OR_VALUE * subset,
int is_unique,
int is_reverse,
int is_primary_key,
int is_foreign_key
)
function catcls_get_or_value_from_method
static int catcls_get_or_value_from_method (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_or_value_from_method_argument
static int catcls_get_or_value_from_method_argument (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_or_value_from_method_file
static int catcls_get_or_value_from_method_file (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_or_value_from_method_signiture
static int catcls_get_or_value_from_method_signiture (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_or_value_from_partition
static int catcls_get_or_value_from_partition (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_or_value_from_query_spec
static int catcls_get_or_value_from_query_spec (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_or_value_from_record
static OR_VALUE * catcls_get_or_value_from_record (
THREAD_ENTRY * thread_p,
RECDES * record,
OID * class_oid
)
function catcls_get_or_value_from_resolution
static int catcls_get_or_value_from_resolution (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
OR_VALUE * value_p
)
function catcls_get_property_set
static int catcls_get_property_set (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
int expected_size,
OR_VALUE * value_p
)
function catcls_get_subset
static int catcls_get_subset (
THREAD_ENTRY * thread_p,
OR_BUF * buf_p,
int expected_size,
OR_VALUE * value_p,
CREADER reader
)
function catcls_guess_record_length
static int catcls_guess_record_length (
OR_VALUE * value_p
)
function catcls_initialize_class_oid_to_oid_hash_table
static int catcls_initialize_class_oid_to_oid_hash_table (
THREAD_ENTRY * thread_p,
int num_entry
)
function catcls_insert_instance
static int catcls_insert_instance (
THREAD_ENTRY * thread_p,
OR_VALUE * value_p,
OID * oid,
OID * root_oid,
OID * class_oid,
HFID * hfid,
HEAP_SCANCACHE * scan
)
function catcls_insert_subset
static int catcls_insert_subset (
THREAD_ENTRY * thread_p,
OR_VALUE * value_p,
OID * root_oid
)
function catcls_put_entry
static int catcls_put_entry (
THREAD_ENTRY * thread_p,
CATCLS_ENTRY * entry,
bool * already_exists
)
function catcls_put_or_value_into_buffer
static int catcls_put_or_value_into_buffer (
OR_VALUE * value_p,
int chn,
OR_BUF * buf_p,
OID * class_oid,
DISK_REPR * rep
)
function catcls_put_or_value_into_record
static int catcls_put_or_value_into_record (
THREAD_ENTRY * thread_p,
OR_VALUE * value_p,
int chn,
RECDES * record,
OID * class_oid
)
function catcls_reorder_attributes_by_repr
static int catcls_reorder_attributes_by_repr (
THREAD_ENTRY * thread_p,
OR_VALUE * value_p
)
function catcls_replace_entry_oid
static int catcls_replace_entry_oid (
THREAD_ENTRY * thread_p,
OID * entry_class_oid,
OID * entry_new_oid
)
function catcls_resolution_space
static int catcls_resolution_space (
int name_space
)
function catcls_set_or_value_timestamps
static void catcls_set_or_value_timestamps (
OR_VALUE * value_p
)
function catcls_unpack_allocator
static char * catcls_unpack_allocator (
int size
)
function catcls_update_instance
static int catcls_update_instance (
THREAD_ENTRY * thread_p,
OR_VALUE * value_p,
OID * oid,
OID * class_oid,
HFID * hfid,
HEAP_SCANCACHE * scan,
UPDATE_INPLACE_STYLE force_in_place
)
function catcls_update_or_value_class_stats_fields
static void catcls_update_or_value_class_stats_fields (
OR_VALUE * value_p,
unsigned int ci_time_stamp,
bool with_fullscan
)
function catcls_update_or_value_updated_time
static void catcls_update_or_value_updated_time (
OR_VALUE * value_p
)
function catcls_update_subset
static int catcls_update_subset (
THREAD_ENTRY * thread_p,
OR_VALUE * value_p,
OR_VALUE * old_value,
bool * uflag,
UPDATE_INPLACE_STYLE force_in_place
)
Macro Definition Documentation
define CATCLS_INDEX_NAME
#define CATCLS_INDEX_NAME `"i__db_class_unique_name"`
define CATCLS_OID_TABLE_SIZE
#define CATCLS_OID_TABLE_SIZE `1024`
define EXCHANGE_OR_VALUE
#define EXCHANGE_OR_VALUE (
a,
b
) `/* multi line expression */`
define IS_SUBSET
#define IS_SUBSET (
value
) `(value).sub.count >= 0`
define SM_CLASSFLAG_SYSTEM
#define SM_CLASSFLAG_SYSTEM `(1)`
The documentation for this class was generated from the following file cubrid/src/storage/catalog_class.c