CUBRID Engine
latest
|
#include "object_representation_sr.h"
#include "btree_load.h"
#include "config.h"
#include "dbtype.h"
#include "error_manager.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "set_object.h"
#include <assert.h>
#include <new>
#include <stdio.h>
#include <string.h>
Go to the source code of this file.
Classes | |
struct | or_btree_property |
Macros | |
#define | DATA_INIT(data, type) memset(data, 0, sizeof(DB_DATA)) |
#define | OR_ARRAY_EXTENT 10 |
#define | OR_VAR_TABLE_ELEMENT_OFFSET(table, index) |
#define | OR_VAR_TABLE_ELEMENT_LENGTH(table, index) |
#define | HEAP_MOVE_INSIDE_RECORD(rec, dest_offset, src_offset) |
Typedefs | |
typedef struct or_btree_property | OR_BTREE_PROPERTY |
#define DATA_INIT | ( | data, | |
type | |||
) | memset(data, 0, sizeof(DB_DATA)) |
Definition at line 42 of file object_representation_sr.c.
#define HEAP_MOVE_INSIDE_RECORD | ( | rec, | |
dest_offset, | |||
src_offset | |||
) |
Definition at line 68 of file object_representation_sr.c.
Referenced by or_mvcc_set_header().
#define OR_ARRAY_EXTENT 10 |
Definition at line 43 of file object_representation_sr.c.
Referenced by or_get_hierarchy_helper().
#define OR_VAR_TABLE_ELEMENT_LENGTH | ( | table, | |
index | |||
) |
Definition at line 54 of file object_representation_sr.c.
Referenced by or_class_get_partition_info(), or_get_all_representation(), or_get_current_representation(), or_get_domain_internal(), or_get_old_representation(), and or_get_unique_hierarchy().
#define OR_VAR_TABLE_ELEMENT_OFFSET | ( | table, | |
index | |||
) |
Definition at line 50 of file object_representation_sr.c.
Referenced by or_class_get_partition_info(), or_get_all_representation(), or_get_attr_string(), or_get_current_representation(), or_get_domain_internal(), or_get_old_representation(), and or_get_unique_hierarchy().
typedef struct or_btree_property OR_BTREE_PROPERTY |
Definition at line 58 of file object_representation_sr.c.
|
static |
Definition at line 1466 of file object_representation_sr.c.
References ARG_FILE_LINE, db_get_string(), DB_TYPE_STRING, DB_VALUE_TYPE, ER_ERROR_SEVERITY, er_set(), ER_SM_INVALID_PROPERTY, error(), i, max, NO_ERROR, NULL, set_get_element_nocopy(), and set_size().
Referenced by or_install_btids().
int or_class_get_partition_info | ( | RECDES * | record, |
OR_PARTITION * | partition_info, | ||
REPR_ID * | repr_id, | ||
int * | has_partition_info | ||
) |
Definition at line 3408 of file object_representation_sr.c.
References assert, CAST_BUFLEN, or_partition::class_hfid, recdes::data, db_get_set(), db_seq_copy(), or_buf::endptr, ER_FAILED, NO_ERROR, NULL, or_class_hfid(), OR_GET_INT, or_get_value(), or_init(), or_rep_id(), OR_SET_ELEMENT_OFFSET, 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_PARTITION_VALUES_INDEX, ORC_PARTITION_VAR_ATT_COUNT, or_partition::partition_type, pr_clear_value(), or_buf::ptr, or_partition::rep_id, and or_partition::values.
Referenced by heap_class_get_partition_info().
Definition at line 732 of file object_representation_sr.c.
References assert, BIG_VAR_OFFSET_SIZE, recdes::data, vfid::fileid, hfid::hpgid, OR_FIXED_ATTRIBUTES_OFFSET, OR_GET_INT, OR_GET_OFFSET_SIZE, ORC_CLASS_VAR_ATT_COUNT, ORC_HFID_FILEID_OFFSET, ORC_HFID_PAGEID_OFFSET, ORC_HFID_VOLID_OFFSET, hfid::vfid, and vfid::volid.
Referenced by catalog_get_representation(), catalog_update(), heap_class_get_partition_info(), heap_get_class_info_from_record(), locator_check_all_entries_of_all_btrees(), locator_check_unique_btree_entries(), locator_prefetch_index_page_internal(), or_class_get_partition_info(), or_get_hierarchy_helper(), and orc_class_info_from_record().
Definition at line 708 of file object_representation_sr.c.
References assert, BIG_VAR_OFFSET_SIZE, recdes::data, OR_FIXED_ATTRIBUTES_OFFSET, OR_GET_OFFSET_SIZE, OR_GET_OID, ORC_CLASS_VAR_ATT_COUNT, and ORC_REP_DIR_OFFSET.
Referenced by catalog_get_dir_oid_from_cache(), catalog_get_rep_dir(), catalog_get_representation(), catalog_update(), locator_insert_force(), locator_update_force(), orc_class_info_from_record(), and xcatalog_check_rep_dir().
void or_class_tde_algorithm | ( | RECDES * | record, |
TDE_ALGORITHM * | tde_algo | ||
) |
Definition at line 752 of file object_representation_sr.c.
References ARG_FILE_LINE, assert, BIG_VAR_OFFSET_SIZE, recdes::data, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), i, max, NO_ERROR, NULL, OID_ISNULL, OID_SET_NULL, OR_FIXED_ATTRIBUTES_OFFSET, OR_GET_INT, OR_GET_OFFSET_SIZE, OR_GET_OID, OR_INT_SIZE, OR_OID_SIZE, OR_SET_ELEMENT_COUNT, OR_SET_HEADER_SIZE, OR_VAR_IS_NULL, OR_VAR_OFFSET, ORC_CLASS_TDE_ALGORITHM, ORC_CLASS_VAR_ATT_COUNT, and ORC_SUBCLASSES_INDEX.
Referenced by heap_get_class_tde_algorithm(), and locator_update_force().
OR_CLASSREP* or_classrep_load_indexes | ( | OR_CLASSREP * | rep, |
RECDES * | record | ||
) |
Definition at line 3378 of file object_representation_sr.c.
References or_classrep::id, or_classrep::needs_indexes, or_free_classrep(), and or_get_classrep().
Definition at line 3782 of file object_representation_sr.c.
References assert, BIG_VAR_OFFSET_SIZE, recdes::data, i, NULL, OR_FIXED_ATTRIBUTES_OFFSET, OR_GET_INT, OR_GET_OFFSET_SIZE, OR_SET_ELEMENT_OFFSET, OR_VAR_OFFSET, OR_VAR_TABLE_SIZE, ORC_ATT_ID_OFFSET, ORC_ATT_VAR_ATT_COUNT, ORC_ATTRIBUTES_INDEX, ORC_CLASS_ATTR_COUNT_OFFSET, ORC_CLASS_ATTRS_INDEX, ORC_CLASS_VAR_ATT_COUNT, ORC_FIXED_COUNT_OFFSET, ORC_SHARED_ATTRS_INDEX, ORC_SHARED_COUNT_OFFSET, and ORC_VARIABLE_COUNT_OFFSET.
Referenced by or_get_attr_string().
void or_free_classrep | ( | OR_CLASSREP * | rep | ) |
Definition at line 3603 of file object_representation_sr.c.
References or_index::asc_desc, or_classrep::attributes, or_index::attrs_prefix_length, or_index::atts, or_attribute::btid_pack, or_attribute::btids, or_index::btname, or_classrep::class_attrs, or_attribute::current_default_value, or_default_value::default_expr, db_default_expr::default_expr_format, or_attribute::default_value, or_function_index::expr_stream, or_function_index::expr_string, or_index::filter_predicate, or_index::fk, or_foreign_key::fkname, free_and_init, or_index::func_index_info, i, or_classrep::indexes, or_foreign_key::next, NULL, or_predicate::pred_stream, or_predicate::pred_string, or_classrep::shared_attrs, and or_default_value::value.
Referenced by heap_classrepr_dump_all(), heap_classrepr_entry_reset(), heap_classrepr_finalize_cache(), heap_classrepr_free(), heap_classrepr_get(), or_classrep_load_indexes(), or_get_all_representation(), or_get_hierarchy_helper(), and orc_diskrep_from_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().
|
static |
Definition at line 1326 of file object_representation_sr.c.
References vfid::fileid, OR_GET_INT, OR_INT_SIZE, btid::root_pageid, btid::vfid, and vfid::volid.
Referenced by or_get_current_representation().
|
static |
Definition at line 3872 of file object_representation_sr.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, db_private_alloc, db_private_free, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), NO_ERROR, NULL, OR_BUF_INIT, or_find_diskattr(), or_get_varchar_compression_lengths(), OR_VAR_TABLE_ELEMENT_OFFSET, ORC_ATT_LAST_INDEX, pr_get_compressed_data_from_buffer(), and rc.
Referenced by or_get_attrcomment(), and or_get_attrname().
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().
int or_get_attrname | ( | RECDES * | record, |
int | attrid, | ||
char ** | string, | ||
int * | alloced_string | ||
) |
Definition at line 3974 of file object_representation_sr.c.
References or_get_attr_string(), and ORC_ATT_NAME_INDEX.
Referenced by catcls_compile_catalog_classes(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), heap_classrepr_dump(), heap_get_partition_attributes(), heap_set_autoincrement_value(), index_attrs_to_string(), qexec_execute_build_columns(), qexec_execute_build_indexes(), cubload::server_class_installer::register_class_with_attributes(), and serial_load_attribute_info_of_db_serial().
OR_CLASSREP* or_get_classrep | ( | RECDES * | record, |
int | repid | ||
) |
Definition at line 3307 of file object_representation_sr.c.
References assert, BIG_VAR_OFFSET_SIZE, recdes::data, NULL_REPRID, or_get_current_representation(), OR_GET_OFFSET_SIZE, or_get_old_representation(), and or_rep_id().
Referenced by heap_classrepr_get_from_record(), or_classrep_load_indexes(), or_get_hierarchy_helper(), and orc_diskrep_from_record().
OR_CLASSREP* or_get_classrep_noindex | ( | RECDES * | record, |
int | repid | ||
) |
Definition at line 3343 of file object_representation_sr.c.
References assert, BIG_VAR_OFFSET_SIZE, recdes::data, NULL_REPRID, or_get_current_representation(), OR_GET_OFFSET_SIZE, or_get_old_representation(), and or_rep_id().
Definition at line 3471 of file object_representation_sr.c.
References assert, recdes::data, db_get_set(), db_get_string(), DB_IS_NULL, DB_TYPE_SEQUENCE, DB_TYPE_STRING, DB_VALUE_TYPE, error(), i, or_classrep::needs_indexes, NO_ERROR, NULL, or_unpack_setref(), OR_VAR_IS_NULL, OR_VAR_OFFSET, ORC_PROPERTIES_INDEX, set_free(), set_get_element_nocopy(), set_size(), SM_PROPERTY_FOREIGN_KEY, SM_PROPERTY_INDEX, SM_PROPERTY_PRIMARY_KEY, SM_PROPERTY_REVERSE_INDEX, SM_PROPERTY_REVERSE_UNIQUE, SM_PROPERTY_UNIQUE, and strdup().
Referenced by qexec_execute_build_indexes().
|
static |
Definition at line 1410 of file object_representation_sr.c.
References or_attribute::current_default_value, or_btree_property::length, NULL, or_unpack_domain(), success(), or_default_value::val_length, and or_default_value::value.
Referenced by or_get_current_representation().
|
static |
Definition at line 2357 of file object_representation_sr.c.
References ARG_FILE_LINE, assert, or_classrep::attributes, or_attribute::auto_increment, BIG_VAR_OFFSET_SIZE, or_attribute::btids, or_classrep::class_attrs, classobj_get_prop(), classobj_initialize_default_expr(), or_attribute::classoid, or_attribute::current_default_value, recdes::data, DB_DEFAULT_NONE, db_get_int(), db_get_set(), db_get_string(), db_make_null(), db_set_free(), DB_TYPE_INTEGER, DB_TYPE_NULL, DB_TYPE_SEQUENCE, db_value_is_null(), DB_VALUE_TYPE, db_value_type(), or_attribute::def_order, or_default_value::default_expr, db_default_expr::default_expr_format, db_default_expr::default_expr_op, db_default_expr::default_expr_type, or_attribute::default_value, or_attribute::domain, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), 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_autoincrement, or_attribute::is_fixed, or_attribute::is_notnull, 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, NO_ERROR, NULL, oid_Null_oid, or_attribute::on_update_expr, OR_FIXED_ATTRIBUTES_OFFSET, or_get_att_index(), or_get_current_default_value(), or_get_default_value(), or_get_domain_and_cache(), OR_GET_INT, OR_GET_OFFSET_SIZE, OR_GET_OID, or_get_value(), or_init(), or_install_btids(), or_rep_id(), 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_ATT_CLASS_OFFSET, ORC_ATT_CURRENT_VALUE_INDEX, ORC_ATT_DEF_ORDER_OFFSET, ORC_ATT_DOMAIN_INDEX, ORC_ATT_FLAG_OFFSET, ORC_ATT_ID_OFFSET, ORC_ATT_INDEX_OFFSET, ORC_ATT_ORIGINAL_VALUE_INDEX, ORC_ATT_PROPERTIES_INDEX, ORC_ATT_TYPE_OFFSET, ORC_ATT_VAR_ATT_COUNT, ORC_ATTRIBUTES_INDEX, ORC_CLASS_ATTR_COUNT_OFFSET, ORC_CLASS_ATTRS_INDEX, ORC_CLASS_VAR_ATT_COUNT, ORC_FIXED_COUNT_OFFSET, ORC_FIXED_LENGTH_OFFSET, ORC_PARTITION_INDEX, ORC_PROPERTIES_INDEX, ORC_SHARED_ATTRS_INDEX, ORC_SHARED_COUNT_OFFSET, ORC_VARIABLE_COUNT_OFFSET, or_attribute::position, pr_clear_value(), or_auto_increment::serial_obj, set_get_element_nocopy(), set_size(), or_classrep::shared_attrs, SM_ATTFLAG_AUTO_INCREMENT, SM_ATTFLAG_NON_NULL, strdup(), T_TO_CHAR, tp_domain_disk_size(), tp_domain_resolve_default(), TP_IS_CHAR_TYPE, or_attribute::type, or_default_value::val_length, and or_default_value::value.
Referenced by or_get_all_representation(), or_get_classrep(), or_get_classrep_noindex(), and or_get_old_representation().
|
static |
Definition at line 1360 of file object_representation_sr.c.
References or_attribute::default_value, or_btree_property::length, NULL, or_unpack_domain(), success(), or_default_value::val_length, and or_default_value::value.
Referenced by or_get_current_representation().
|
static |
Definition at line 1305 of file object_representation_sr.c.
References NULL, or_get_domain_internal(), and tp_domain_cache().
Referenced by or_get_all_representation(), or_get_current_representation(), and or_get_old_representation().
|
static |
Definition at line 1193 of file object_representation_sr.c.
References assert, tp_domain::class_mop, tp_domain::class_oid, tp_domain::codeset, tp_domain::collation_id, db_enumeration::collation_id, DB_TYPE_ENUMERATION, DOM_GET_ENUMERATION, DOM_SET_ENUM, tp_domain::enumeration, error(), i, INTL_CODESET_ISO88591, tp_domain::json_validator, LANG_COLL_ISO_BINARY, tp_domain::next, NO_ERROR, NULL, or_get_enumeration(), OR_GET_INT, or_get_json_validator(), OR_GET_OID, or_init(), OR_SET_ELEMENT_COUNT, OR_SET_ELEMENT_OFFSET, OR_VAR_TABLE_ELEMENT_LENGTH, OR_VAR_TABLE_ELEMENT_OFFSET, OR_VAR_TABLE_SIZE, ORC_DOMAIN_CLASS_OFFSET, ORC_DOMAIN_CODESET_OFFSET, ORC_DOMAIN_COLLATION_ID_OFFSET, ORC_DOMAIN_ENUMERATION_INDEX, ORC_DOMAIN_PRECISION_OFFSET, ORC_DOMAIN_SCALE_OFFSET, ORC_DOMAIN_SCHEMA_JSON_OFFSET, ORC_DOMAIN_SETDOMAIN_INDEX, ORC_DOMAIN_TYPE_OFFSET, ORC_DOMAIN_VAR_ATT_COUNT, tp_domain::precision, tp_domain::scale, tp_domain::setdomain, tp_domain_free(), and tp_domain_new().
Referenced by or_get_domain_and_cache().
|
static |
Definition at line 909 of file object_representation_sr.c.
References ARG_FILE_LINE, assert, or_index::btid, BTID_IS_EQUAL, COPY, COPY_OID, recdes::data, er_errid(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), or_classrep::has_partition_info, heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), HFID_IS_NULL, i, or_classrep::indexes, or_classrep::n_indexes, NO_ERROR, NULL, NULL_REPRID, OID_EQ, OR_ARRAY_EXTENT, or_class_hfid(), or_free_classrep(), or_get_classrep(), OR_GET_OID, OR_INT_SIZE, OR_OID_SIZE, OR_SET_ELEMENT_COUNT, OR_SET_HEADER_SIZE, OR_VAR_IS_NULL, OR_VAR_OFFSET, ORC_SUBCLASSES_INDEX, RECDES_INITIALIZER, S_SUCCESS, and success().
Referenced by or_get_unique_hierarchy().
|
static |
Definition at line 2888 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_CT_UNKNOWN_REPRID, ER_ERROR_SEVERITY, er_set(), 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_indexes, or_classrep::n_variable, or_classrep::needs_indexes, NULL, NULL_REPRID, OID_SET_NULL, 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 or_get_classrep(), and or_get_classrep_noindex().
int or_get_unique_hierarchy | ( | THREAD_ENTRY * | thread_p, |
RECDES * | record, | ||
int | attrid, | ||
BTID * | btid, | ||
OID ** | class_oids, | ||
HFID ** | hfids, | ||
int * | num_classes, | ||
int * | partition_local_index | ||
) |
Definition at line 1102 of file object_representation_sr.c.
References ARG_FILE_LINE, assert, BIG_VAR_OFFSET_SIZE, recdes::data, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), error(), free_and_init, i, NO_ERROR, NULL, OR_FIXED_ATTRIBUTES_OFFSET, or_get_hierarchy_helper(), OR_GET_INT, OR_GET_OFFSET_SIZE, OR_GET_OID, OR_SET_ELEMENT_OFFSET, OR_VAR_OFFSET, OR_VAR_TABLE_ELEMENT_LENGTH, OR_VAR_TABLE_ELEMENT_OFFSET, OR_VAR_TABLE_SIZE, ORC_ATT_CLASS_OFFSET, ORC_ATT_ID_OFFSET, ORC_ATT_NAME_INDEX, ORC_ATT_VAR_ATT_COUNT, ORC_ATTRIBUTES_INDEX, ORC_CLASS_VAR_ATT_COUNT, ORC_FIXED_COUNT_OFFSET, and ORC_VARIABLE_COUNT_OFFSET.
Referenced by locator_check_unique_btree_entries().
|
static |
Definition at line 2255 of file object_representation_sr.c.
References ARG_FILE_LINE, BTREE_FOREIGN_KEY, BTREE_INDEX, BTREE_PRIMARY_KEY, BTREE_REVERSE_INDEX, BTREE_REVERSE_UNIQUE, BTREE_UNIQUE, db_get_set(), db_get_string(), DB_TYPE_SEQUENCE, DB_VALUE_TYPE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), i, or_classrep::indexes, or_btree_property::length, or_btree_property::name, NO_ERROR, NULL, or_cl_get_prop_nocopy(), or_install_btids_constraint(), or_btree_property::seq, set_get_element_nocopy(), set_size(), SM_PROPERTY_FOREIGN_KEY, SM_PROPERTY_INDEX, SM_PROPERTY_NUM_INDEX_FAMILY, SM_PROPERTY_PRIMARY_KEY, SM_PROPERTY_REVERSE_INDEX, SM_PROPERTY_REVERSE_UNIQUE, SM_PROPERTY_UNIQUE, and or_btree_property::type.
Referenced by or_get_all_representation(), or_get_current_representation(), and or_get_old_representation().
|
static |
Definition at line 2112 of file object_representation_sr.c.
References or_classrep::attributes, or_attribute::btid_pack, or_attribute::btids, i, or_attribute::id, or_attribute::max_btids, or_attribute::n_btids, NULL, OR_ATT_BTID_PREALLOC, and success().
Referenced by or_install_btids_constraint().
|
static |
Definition at line 1867 of file object_representation_sr.c.
References ARG_FILE_LINE, or_index::asc_desc, assert, or_classrep::attributes, or_index::attrs_prefix_length, or_index::atts, or_index::btid, or_index::btname, BTREE_FOREIGN_KEY, BTREE_PRIMARY_KEY, db_get_int(), db_get_set(), db_get_string(), DB_IS_NULL, db_make_null(), DB_TYPE_INTEGER, DB_TYPE_SEQUENCE, DB_TYPE_STRING, DB_VALUE_TYPE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), or_index::filter_predicate, or_index::fk, or_index::func_index_info, i, or_attribute::id, or_index::index_status, or_classrep::indexes, or_index::n_atts, or_classrep::n_indexes, NO_ERROR, NULL, or_install_btids_filter_pred(), or_install_btids_foreign_key(), or_install_btids_foreign_key_ref(), or_install_btids_function_info(), or_install_btids_prefix_length(), OR_NO_INDEX, or_btree_property::seq, set_get_element_nocopy(), set_size(), SM_FILTER_INDEX_ID, SM_FUNCTION_INDEX_ID, SM_PREFIX_INDEX_ID, strdup(), or_btree_property::type, and or_index::type.
Referenced by or_install_btids_constraint().
|
static |
Definition at line 2193 of file object_representation_sr.c.
References assert, classobj_decompose_property_oid(), db_get_int(), db_get_string(), DB_TYPE_INTEGER, DB_TYPE_STRING, DB_VALUE_TYPE, i, NO_ERROR, NULL, or_install_btids_attribute(), or_install_btids_class(), set_get_element_nocopy(), and set_size().
Referenced by or_install_btids().
Definition at line 1734 of file object_representation_sr.c.
References ARG_FILE_LINE, db_get_string(), db_get_string_size(), DB_TYPE_CHAR, DB_TYPE_NULL, DB_TYPE_STRING, DB_VALUE_TYPE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SM_INVALID_PROPERTY, err, error(), or_index::filter_predicate, free_and_init, NO_ERROR, NULL, or_predicate::pred_stream, or_predicate::pred_stream_size, or_predicate::pred_string, set_get_element_nocopy(), strdup(), and strlen.
Referenced by or_install_btids_class().
|
static |
Definition at line 1525 of file object_representation_sr.c.
References assert, classobj_decompose_property_oid(), db_get_int(), db_get_string(), or_foreign_key::del_action, vfid::fileid, or_index::fk, or_foreign_key::fkname, or_foreign_key::next, NO_ERROR, NULL, db_identifier::pageid, or_foreign_key::ref_class_oid, or_foreign_key::ref_class_pk_btid, btid::root_pageid, set_get_element_nocopy(), db_identifier::slotid, strdup(), or_foreign_key::upd_action, btid::vfid, vfid::volid, and db_identifier::volid.
Referenced by or_install_btids_class().
Definition at line 1586 of file object_representation_sr.c.
References assert, classobj_decompose_property_oid(), db_get_int(), db_get_set(), db_get_string(), or_foreign_key::del_action, vfid::fileid, or_index::fk, or_foreign_key::fkname, free_and_init, i, or_foreign_key::next, NO_ERROR, NULL, p, db_identifier::pageid, btid::root_pageid, or_foreign_key::self_btid, or_foreign_key::self_oid, set_get_element_nocopy(), set_size(), db_identifier::slotid, strdup(), or_foreign_key::upd_action, btid::vfid, vfid::volid, and db_identifier::volid.
Referenced by or_install_btids_class().
Definition at line 4007 of file object_representation_sr.c.
References ARG_FILE_LINE, or_function_index::attr_index_start, or_function_index::col_id, db_get_int(), db_get_string(), db_get_string_size(), DB_TYPE_CHAR, DB_TYPE_NULL, DB_TYPE_STRING, DB_VALUE_TYPE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SM_INVALID_PROPERTY, error(), or_function_index::expr_stream, or_function_index::expr_stream_size, or_function_index::expr_string, free_and_init, or_index::func_index_info, NO_ERROR, NULL, set_get_element_nocopy(), strdup(), and strlen.
Referenced by or_install_btids_class().
|
static |
Definition at line 1702 of file object_representation_sr.c.
References ARG_FILE_LINE, assert, or_index::attrs_prefix_length, db_get_int(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, i, NO_ERROR, NULL, set_get_element_nocopy(), and set_size().
Referenced by or_install_btids_class().
int or_mvcc_add_header | ( | RECDES * | record, |
MVCC_REC_HEADER * | mvcc_rec_header, | ||
int | bound_bit, | ||
int | variable_offset_size | ||
) |
Definition at line 4335 of file object_representation_sr.c.
References recdes::area_size, assert, or_buf::buffer, CAST_BUFLEN, recdes::data, er_errid(), ER_FAILED, error(), recdes::length, mvcc_rec_header::mvcc_flag, NO_ERROR, NULL, OR_BUF_INIT, or_mvcc_set_chn(), or_mvcc_set_delid(), or_mvcc_set_insid(), or_mvcc_set_prev_version_lsa(), or_mvcc_set_repid_and_flags(), or_buf::ptr, and mvcc_rec_header::repid.
Referenced by heap_delete_home(), heap_delete_relocation(), heap_rv_mvcc_redo_insert(), and heap_rv_mvcc_redo_redistribute().
|
static |
Definition at line 4557 of file object_representation_sr.c.
References assert, ASSERT_ALIGN, or_buf::endptr, INT_ALIGNMENT, NO_ERROR, NULL, NULL_CHN, OR_GET_INT, OR_INT_SIZE, or_underflow(), or_buf::ptr, and STATIC_INLINE.
Referenced by or_mvcc_get_header().
|
static |
Definition at line 4522 of file object_representation_sr.c.
References assert, ASSERT_ALIGN, or_buf::endptr, INT_ALIGNMENT, MVCCID_NULL, NO_ERROR, NULL, OR_GET_BIGINT, OR_MVCC_FLAG_VALID_DELID, OR_MVCCID_SIZE, or_underflow(), or_buf::ptr, and STATIC_INLINE.
Referenced by or_mvcc_get_header().
|
static |
Definition at line 4427 of file object_representation_sr.c.
References assert, recdes::data, recdes::length, NULL, OR_GET_MVCC_FLAG, and OR_HEADER_SIZE.
Referenced by or_mvcc_set_log_lsa_to_record(), and or_replace_rep_id().
int or_mvcc_get_header | ( | RECDES * | record, |
MVCC_REC_HEADER * | mvcc_header | ||
) |
Definition at line 4191 of file object_representation_sr.c.
References assert, mvcc_rec_header::chn, recdes::data, er_errid(), ER_FAILED, recdes::length, mvcc_rec_header::mvcc_del_id, mvcc_rec_header::mvcc_flag, mvcc_rec_header::mvcc_ins_id, NO_ERROR, NULL, or_init(), OR_MVCC_FLAG_MASK, OR_MVCC_FLAG_SHIFT_BITS, or_mvcc_get_chn(), or_mvcc_get_delid(), or_mvcc_get_insid(), or_mvcc_get_prev_version_lsa(), or_mvcc_get_repid_and_flags(), OR_MVCC_REP_SIZE, OR_MVCC_REPID_MASK, mvcc_rec_header::prev_version_lsa, rc, and mvcc_rec_header::repid.
Referenced by btree_sort_get_next(), heap_delete_home(), heap_delete_relocation(), heap_get_if_diff_chn(), heap_get_mvcc_header(), heap_get_mvcc_rec_header_from_overflow(), heap_get_record_info(), heap_get_visible_version_from_log(), heap_insert_adjust_recdes_header(), heap_mvcc_log_redistribute(), heap_rv_mvcc_redo_delete_internal(), heap_rv_mvcc_undo_delete(), heap_update_adjust_recdes_header(), locator_lock_and_get_object_internal(), locator_lock_and_get_object_with_evaluation(), locator_update_force(), lock_demote_class_lock(), vacuum_check_not_vacuumed_recdes(), vacuum_heap_prepare_record(), vacuum_rv_check_at_undo(), and vacuum_rv_redo_vacuum_heap_page().
|
static |
Definition at line 4471 of file object_representation_sr.c.
References ASSERT_ALIGN, or_buf::endptr, INT_ALIGNMENT, MVCCID_ALL_VISIBLE, NO_ERROR, OR_GET_BIGINT, OR_MVCC_FLAG_VALID_INSID, OR_MVCCID_SIZE, or_underflow(), or_buf::ptr, and STATIC_INLINE.
Referenced by or_mvcc_get_header().
|
static |
Definition at line 4656 of file object_representation_sr.c.
References assert, ASSERT_ALIGN, or_buf::endptr, INT_ALIGNMENT, LSA_SET_NULL(), NO_ERROR, NULL, OR_MVCC_FLAG_VALID_PREV_VERSION, OR_MVCC_PREV_VERSION_LSA_SIZE, or_underflow(), and or_buf::ptr.
Referenced by or_mvcc_get_header().
|
static |
Definition at line 4609 of file object_representation_sr.c.
References assert, ASSERT_ALIGN, mvcc_rec_header::chn, INT_ALIGNMENT, NULL, or_put_int(), or_buf::ptr, and STATIC_INLINE.
Referenced by or_mvcc_add_header(), and or_mvcc_set_header().
|
static |
Definition at line 4588 of file object_representation_sr.c.
References assert, ASSERT_ALIGN, INT_ALIGNMENT, mvcc_rec_header::mvcc_del_id, mvcc_rec_header::mvcc_flag, NO_ERROR, NULL, OR_MVCC_FLAG_VALID_DELID, or_put_bigint(), or_buf::ptr, and STATIC_INLINE.
Referenced by or_mvcc_add_header(), and or_mvcc_set_header().
|
static |
Definition at line 4442 of file object_representation_sr.c.
References recdes::area_size, assert, or_buf::buffer, recdes::data, recdes::length, NULL, OR_BUF_INIT, OR_GET_INT, OR_MVCC_FLAG_MASK, OR_MVCC_FLAG_SHIFT_BITS, OR_MVCC_REP_SIZE, or_put_int(), OR_REP_OFFSET, or_buf::ptr, and STATIC_INLINE.
int or_mvcc_set_header | ( | RECDES * | record, |
MVCC_REC_HEADER * | mvcc_rec_header | ||
) |
Definition at line 4250 of file object_representation_sr.c.
References recdes::area_size, assert, recdes::data, er_errid(), ER_FAILED, error(), HEAP_MOVE_INSIDE_RECORD, recdes::length, mvcc_rec_header::mvcc_flag, mvcc_header_size_lookup, NO_ERROR, NULL, OR_BOUND_BIT_FLAG, OR_BUF_INIT, OR_GET_MVCC_REPID_AND_FLAG, OR_GET_OFFSET_SIZE, OR_MVCC_FLAG_MASK, OR_MVCC_FLAG_SHIFT_BITS, OR_MVCC_MIN_HEADER_SIZE, or_mvcc_set_chn(), or_mvcc_set_delid(), or_mvcc_set_insid(), or_mvcc_set_prev_version_lsa(), or_mvcc_set_repid_and_flags(), and mvcc_rec_header::repid.
Referenced by heap_insert_adjust_recdes_header(), heap_rv_mvcc_redo_delete_internal(), heap_rv_mvcc_undo_delete(), heap_set_mvcc_rec_header_on_overflow(), heap_update_adjust_recdes_header(), locator_update_force(), vacuum_rv_check_at_undo(), and vacuum_rv_redo_vacuum_heap_page().
|
static |
Definition at line 4502 of file object_representation_sr.c.
References ASSERT_ALIGN, INT_ALIGNMENT, mvcc_rec_header::mvcc_flag, mvcc_rec_header::mvcc_ins_id, NO_ERROR, OR_MVCC_FLAG_VALID_INSID, or_put_bigint(), or_buf::ptr, and STATIC_INLINE.
Referenced by or_mvcc_add_header(), and or_mvcc_set_header().
Definition at line 4394 of file object_representation_sr.c.
References assert, recdes::data, ER_FAILED, NO_ERROR, NULL, OR_INT_SIZE, OR_MVCC_FLAG_VALID_DELID, OR_MVCC_FLAG_VALID_INSID, OR_MVCC_FLAG_VALID_PREV_VERSION, or_mvcc_get_flag(), OR_MVCC_PREV_VERSION_LSA_SIZE, OR_MVCC_REP_SIZE, OR_MVCCID_SIZE, and OR_REP_OFFSET.
Referenced by heap_update_bigone(), and heap_update_set_prev_version().
|
static |
Definition at line 4625 of file object_representation_sr.c.
References assert, ASSERT_ALIGN, or_buf::endptr, INT_ALIGNMENT, mvcc_rec_header::mvcc_flag, NO_ERROR, NULL, OR_MVCC_FLAG_VALID_PREV_VERSION, OR_MVCC_PREV_VERSION_LSA_SIZE, or_overflow(), mvcc_rec_header::prev_version_lsa, or_buf::ptr, and STATIC_INLINE.
Referenced by or_mvcc_add_header(), and or_mvcc_set_header().
int or_replace_rep_id | ( | RECDES * | record, |
int | repid | ||
) |
Definition at line 4131 of file object_representation_sr.c.
References recdes::area_size, or_buf::buffer, recdes::data, NO_ERROR, OR_BOUND_BIT_FLAG, OR_BUF_INIT, OR_GET_BOUND_BIT_FLAG, OR_GET_MVCC_REPID_AND_FLAG, OR_GET_OFFSET_SIZE, or_mvcc_get_flag(), OR_MVCC_REPID_MASK, or_put_int(), OR_REP_OFFSET, OR_SET_VAR_OFFSET_SIZE, and or_buf::ptr.
Referenced by locator_insert_force(), and locator_repl_prepare_force().
Definition at line 494 of file object_representation_sr.c.
References ARG_FILE_LINE, cls_info::ci_hfid, cls_info::ci_rep_dir, cls_info::ci_time_stamp, cls_info::ci_tot_objects, cls_info::ci_tot_pages, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), NULL, or_class_hfid(), and or_class_rep_dir().
Referenced by catalog_insert().
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().
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().
void orc_free_diskrep | ( | DISK_REPR * | rep | ) |
Definition at line 423 of file object_representation_sr.c.
References disk_attribute::bt_stats, disk_representation::fixed, free_and_init, i, disk_attribute::n_btstats, disk_representation::n_fixed, disk_representation::n_variable, NULL, btree_stats::pkeys, disk_attribute::value, and disk_representation::variable.
Referenced by catalog_insert(), catalog_update(), orc_diskrep_from_record(), and xcatalog_check_rep_dir().
Definition at line 544 of file object_representation_sr.c.
References ARG_FILE_LINE, assert, recdes::data, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), i, max, NO_ERROR, NULL, OID_ISNULL, OID_SET_NULL, OR_GET_OID, OR_INT_SIZE, OR_OID_SIZE, OR_SET_ELEMENT_COUNT, OR_SET_HEADER_SIZE, OR_VAR_IS_NULL, OR_VAR_OFFSET, and ORC_SUBCLASSES_INDEX.
Referenced by heap_get_class_subclasses(), and locator_guess_sub_classes().
Definition at line 646 of file object_representation_sr.c.
References ARG_FILE_LINE, assert, recdes::data, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), i, NO_ERROR, NULL, OR_GET_OID, OR_INT_SIZE, OR_OID_SIZE, OR_SET_ELEMENT_COUNT, OR_SET_HEADER_SIZE, OR_VAR_IS_NULL, OR_VAR_OFFSET, and ORC_SUPERCLASSES_INDEX.
Referenced by heap_get_class_supers().