CUBRID Engine  latest
object_representation_sr.h File Reference
#include "dbtype_def.h"
#include "log_lsa.hpp"
#include "mvcc.h"
#include "storage_common.h"
#include "system_catalog.h"
#include <atomic>
Include dependency graph for object_representation_sr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  or_default_value
 
union  or_aligned_oid
 
struct  or_auto_increment
 
struct  or_attribute
 
struct  or_foreign_key
 
struct  or_predicate
 
struct  or_function_index
 
struct  or_index
 
struct  or_partition
 
struct  or_classrep
 
struct  or_class
 

Macros

#define OR_ATT_BTID_PREALLOC   8
 

Typedefs

typedef struct or_default_value OR_DEFAULT_VALUE
 
typedef struct or_attribute OR_ATTRIBUTE
 
typedef struct or_foreign_key OR_FOREIGN_KEY
 
typedef struct or_predicate OR_PREDICATE
 
typedef struct or_function_index OR_FUNCTION_INDEX
 
typedef struct or_index OR_INDEX
 
typedef struct or_partition OR_PARTITION
 
typedef struct or_classrep OR_CLASSREP
 
typedef struct or_class OR_CLASS
 

Enumerations

enum  OR_INDEX_STATUS {
  OR_NO_INDEX = 0, OR_NORMAL_INDEX = 1, OR_INVISIBLE_INDEX = 2, OR_ONLINE_INDEX_BUILDING_IN_PROGRESS = 3,
  OR_RESERVED_INDEX_STATUS1 = 4, OR_RESERVED_INDEX_STATUS2 = 5, OR_RESERVED_INDEX_STATUS3 = 6, OR_RESERVED_INDEX_STATUS4 = 7,
  OR_RESERVED_INDEX_STATUS5 = 8, OR_RESERVED_INDEX_STATUS6 = 9, OR_LAST_INDEX_STATUS = 10
}
 

Functions

void or_class_rep_dir (RECDES *record, OID *rep_dir_p)
 
void or_class_hfid (RECDES *record, HFID *hfid)
 
void or_class_tde_algorithm (RECDES *record, TDE_ALGORITHM *tde_algo)
 
int or_get_unique_hierarchy (THREAD_ENTRY *thread_p, RECDES *record, int attrid, BTID *btid, OID **class_oids, HFID **hfids, int *num_heaps, int *partition_local_index)
 
OR_CLASSREPor_get_classrep (RECDES *record, int repid)
 
OR_CLASSREPor_get_classrep_noindex (RECDES *record, int repid)
 
OR_CLASSREPor_classrep_load_indexes (OR_CLASSREP *rep, RECDES *record)
 
int or_class_get_partition_info (RECDES *record, OR_PARTITION *partition_info, REPR_ID *repr_id, int *has_partition_info)
 
const char * or_get_constraint_comment (RECDES *record, const char *constraint_name)
 
void or_free_classrep (OR_CLASSREP *rep)
 
int or_get_attrname (RECDES *record, int attrid, char **string, int *alloced_string)
 
int or_get_attrcomment (RECDES *record, int attrid, char **string, int *alloced_string)
 
DISK_REPRorc_diskrep_from_record (THREAD_ENTRY *thread_p, RECDES *record)
 
void orc_free_diskrep (DISK_REPR *rep)
 
CLS_INFOorc_class_info_from_record (RECDES *record)
 
void orc_free_class_info (CLS_INFO *info)
 
int orc_subclasses_from_record (RECDES *record, int *array_size, OID **array_ptr)
 
int orc_superclasses_from_record (RECDES *record, int *array_size, OID **array_ptr)
 
OR_CLASSREP ** or_get_all_representation (RECDES *record, bool do_indexes, int *count)
 
int or_replace_rep_id (RECDES *record, int repid)
 
int or_mvcc_get_header (RECDES *record, MVCC_REC_HEADER *mvcc_rec_header)
 
int or_mvcc_set_header (RECDES *record, MVCC_REC_HEADER *mvcc_rec_header)
 
int or_mvcc_add_header (RECDES *record, MVCC_REC_HEADER *mvcc_rec_header, int bound_bit, int variable_offset_size)
 
int or_mvcc_set_log_lsa_to_record (RECDES *record, LOG_LSA *lsa)
 

Macro Definition Documentation

#define OR_ATT_BTID_PREALLOC   8

Definition at line 46 of file object_representation_sr.h.

Referenced by or_install_btids_attribute().

Typedef Documentation

typedef struct or_attribute OR_ATTRIBUTE

Definition at line 89 of file object_representation_sr.h.

typedef struct or_class OR_CLASS

Definition at line 219 of file object_representation_sr.h.

typedef struct or_classrep OR_CLASSREP

Definition at line 196 of file object_representation_sr.h.

Definition at line 49 of file object_representation_sr.h.

Definition at line 121 of file object_representation_sr.h.

Definition at line 142 of file object_representation_sr.h.

typedef struct or_index OR_INDEX

Definition at line 169 of file object_representation_sr.h.

typedef struct or_partition OR_PARTITION

Definition at line 186 of file object_representation_sr.h.

typedef struct or_predicate OR_PREDICATE

Definition at line 134 of file object_representation_sr.h.

Enumeration Type Documentation

Enumerator
OR_NO_INDEX 
OR_NORMAL_INDEX 
OR_INVISIBLE_INDEX 
OR_ONLINE_INDEX_BUILDING_IN_PROGRESS 
OR_RESERVED_INDEX_STATUS1 
OR_RESERVED_INDEX_STATUS2 
OR_RESERVED_INDEX_STATUS3 
OR_RESERVED_INDEX_STATUS4 
OR_RESERVED_INDEX_STATUS5 
OR_RESERVED_INDEX_STATUS6 
OR_LAST_INDEX_STATUS 

Definition at line 153 of file object_representation_sr.h.

Function Documentation

OR_CLASSREP* or_classrep_load_indexes ( OR_CLASSREP rep,
RECDES record 
)
OR_CLASSREP** or_get_all_representation ( RECDES record,
bool  do_indexes,
int *  count 
)

Definition at line 3092 of file object_representation_sr.c.

References ARG_FILE_LINE, assert, or_classrep::attributes, BIG_VAR_OFFSET_SIZE, BTID_SET_NULL, or_attribute::btids, or_classrep::class_attrs, classobj_initialize_default_expr(), or_attribute::classoid, or_attribute::current_default_value, recdes::data, DB_ATT_ALIGN, db_set_free(), or_default_value::default_expr, or_attribute::default_value, or_attribute::domain, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), or_classrep::fixed_length, free_and_init, or_classrep::has_partition_info, i, or_attribute::id, or_classrep::id, or_attribute::index, or_classrep::indexes, or_attribute::is_fixed, or_attribute::location, or_classrep::n_attributes, or_attribute::n_btids, or_classrep::n_class_attrs, or_classrep::n_indexes, or_classrep::n_shared_attrs, or_classrep::n_variable, or_classrep::needs_indexes, or_classrep::next, NULL, OID_SET_NULL, or_free_classrep(), or_get_current_representation(), or_get_domain_and_cache(), OR_GET_INT, OR_GET_OFFSET_SIZE, or_install_btids(), OR_SET_ELEMENT_COUNT, OR_SET_ELEMENT_OFFSET, or_unpack_setref(), OR_VAR_IS_NULL, OR_VAR_OFFSET, OR_VAR_TABLE_ELEMENT_LENGTH, OR_VAR_TABLE_ELEMENT_OFFSET, OR_VAR_TABLE_SIZE, ORC_PARTITION_INDEX, ORC_PROPERTIES_INDEX, ORC_REP_ATTRIBUTES_INDEX, ORC_REP_FIXED_COUNT_OFFSET, ORC_REP_ID_OFFSET, ORC_REP_VAR_ATT_COUNT, ORC_REP_VARIABLE_COUNT_OFFSET, ORC_REPATT_DOMAIN_INDEX, ORC_REPATT_ID_OFFSET, ORC_REPATT_TYPE_OFFSET, ORC_REPATT_VAR_ATT_COUNT, ORC_REPRESENTATIONS_INDEX, or_attribute::position, or_classrep::shared_attrs, tp_domain_disk_size(), tp_domain_resolve_default(), or_attribute::type, or_default_value::val_length, and or_default_value::value.

Referenced by heap_classrepr_dump_all().

Here is the caller graph for this function:

int or_get_attrcomment ( RECDES record,
int  attrid,
char **  string,
int *  alloced_string 
)

Definition at line 3993 of file object_representation_sr.c.

References or_get_attr_string(), and ORC_ATT_COMMENT_INDEX.

Referenced by qexec_execute_build_columns().

Here is the caller graph for this function:

DISK_REPR* orc_diskrep_from_record ( THREAD_ENTRY thread_p,
RECDES record 
)

Definition at line 173 of file object_representation_sr.c.

References ARG_FILE_LINE, assert, or_classrep::attributes, disk_attribute::bt_stats, btree_stats::btid, or_index::btid, BTID_IS_EQUAL, or_attribute::btids, btree_get_root_header(), btree_glean_root_header_info(), BTREE_STATS_PKEYS_NUM, BTREE_STATS_RESERVED_NUM, disk_attribute::classoid, or_attribute::classoid, or_function_index::col_id, DB_TYPE_MIDXKEY, or_attribute::default_value, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), disk_representation::fixed, disk_representation::fixed_length, or_classrep::fixed_length, or_index::func_index_info, btree_stats::has_function, btree_stats::height, i, disk_representation::id, disk_attribute::id, or_attribute::id, or_classrep::id, or_classrep::indexes, or_attribute::is_fixed, btree_stats::key_type, btid_int::key_type, btree_stats::keys, btree_stats::leafs, disk_attribute::location, or_attribute::location, or_classrep::n_attributes, or_attribute::n_btids, disk_attribute::n_btstats, disk_representation::n_fixed, or_classrep::n_indexes, disk_representation::n_variable, NO_ERROR, NULL, NULL_REPRID, OLD_PAGE, or_free_classrep(), or_get_classrep(), orc_free_diskrep(), PAGE_BTREE, vpid::pageid, btree_stats::pages, pgbuf_check_page_ptype(), pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, btree_stats::pkeys, btree_stats::pkeys_size, disk_attribute::position, or_attribute::position, btid::root_pageid, tp_domain::setdomain, btid_int::sys_btid, tp_domain_size(), TP_DOMAIN_TYPE, disk_attribute::type, or_attribute::type, or_default_value::val_length, disk_attribute::val_length, or_default_value::value, disk_attribute::value, disk_representation::variable, btid::vfid, vpid::volid, vfid::volid, and VPID_ISNULL.

Referenced by catalog_insert(), catalog_update(), and xcatalog_check_rep_dir().

Here is the caller graph for this function:

void orc_free_class_info ( CLS_INFO info)

Definition at line 523 of file object_representation_sr.c.

References free_and_init.

Referenced by catalog_insert().

Here is the caller graph for this function:

int orc_subclasses_from_record ( RECDES record,
int *  array_size,
OID **  array_ptr 
)
int orc_superclasses_from_record ( RECDES record,
int *  array_size,
OID **  array_ptr 
)