CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "dbtype.h"
#include "authenticate.h"
#include "string_opfunc.h"
#include "schema_manager.h"
#include "porting.h"
#include "chartype.h"
#include "dynamic_load.h"
#include "error_manager.h"
#include "work_space.h"
#include "object_primitive.h"
#include "class_object.h"
#include "message_catalog.h"
#include "memory_alloc.h"
#include "environment_variable.h"
#include "language_support.h"
#include "object_representation.h"
#include "object_domain.h"
#include "set_object.h"
#include "virtual_object.h"
#include "transform_cl.h"
#include "locator_cl.h"
#include "statistics.h"
#include "network_interface_cl.h"
#include "parser.h"
#include "trigger_manager.h"
#include "storage_common.h"
#include "transform.h"
#include "system_parameter.h"
#include "object_template.h"
#include "execute_schema.h"
#include "release_string.h"
#include "execute_statement.h"
#include "crypt_opfunc.h"
#include "db.h"
#include "object_accessor.h"
#include "boot_cl.h"
#include <nlist.h>
Go to the source code of this file.
Classes | |
struct | schema_def |
struct | static_method |
struct | method_link |
struct | sm_candidate |
Macros | |
#define | SM_ADD_CONSTRAINT_SAVEPOINT_NAME "aDDcONSTRAINT" |
#define | SM_ADD_UNIQUE_CONSTRAINT_SAVEPOINT_NAME "aDDuNIQUEcONSTRAINT" |
#define | SM_DROP_CLASS_MOP_SAVEPOINT_NAME "dELETEcLASSmOP" |
#define | SM_TRUNCATE_SAVEPOINT_NAME "SmtRUnCATE" |
#define | WC_PERIOD L'.' |
#define | MAX_ATTR_IN_AUTO_GEN_NAME 30 |
Typedefs | |
typedef struct schema_def | SCHEMA_DEF |
typedef struct static_method | STATIC_METHOD |
typedef struct method_link | METHOD_LINK |
typedef struct sm_candidate | SM_CANDIDATE |
Enumerations | |
enum | DOMAIN_COMP { DC_INCOMPATIBLE, DC_EQUAL, DC_LESS_SPECIFIC, DC_MORE_SPECIFIC } |
Variables | |
static SCHEMA_DEF | Current_Schema = { {'\0'}, NULL, NULL, NULL, NULL } |
static STATIC_METHOD * | Static_method_table = NULL |
SM_DESCRIPTOR * | sm_Descriptors = NULL |
ROOT_CLASS | sm_Root_class |
MOP | sm_Root_class_mop = NULL |
const char * | sm_Root_class_name = ROOTCLASS_NAME |
HFID * | sm_Root_class_hfid = &sm_Root_class.header.ch_heap |
static unsigned int | local_schema_version = 0 |
static unsigned int | global_schema_version = 0 |
#define MAX_ATTR_IN_AUTO_GEN_NAME 30 |
Referenced by sm_default_constraint_name().
#define SM_ADD_CONSTRAINT_SAVEPOINT_NAME "aDDcONSTRAINT" |
Definition at line 82 of file schema_manager.c.
Referenced by sm_add_constraint().
#define SM_ADD_UNIQUE_CONSTRAINT_SAVEPOINT_NAME "aDDuNIQUEcONSTRAINT" |
Definition at line 83 of file schema_manager.c.
Referenced by update_class().
#define SM_DROP_CLASS_MOP_SAVEPOINT_NAME "dELETEcLASSmOP" |
Definition at line 84 of file schema_manager.c.
Referenced by sm_delete_class_mop().
#define SM_TRUNCATE_SAVEPOINT_NAME "SmtRUnCATE" |
Definition at line 85 of file schema_manager.c.
Referenced by sm_truncate_class().
#define WC_PERIOD L'.' |
Definition at line 136 of file schema_manager.c.
Referenced by sm_expand_method_files().
typedef struct method_link METHOD_LINK |
Definition at line 157 of file schema_manager.c.
typedef struct schema_def SCHEMA_DEF |
typedef struct sm_candidate SM_CANDIDATE |
Definition at line 186 of file schema_manager.c.
typedef struct static_method STATIC_METHOD |
Definition at line 143 of file schema_manager.c.
enum DOMAIN_COMP |
Enumerator | |
---|---|
DC_INCOMPATIBLE | |
DC_EQUAL | |
DC_LESS_SPECIFIC | |
DC_MORE_SPECIFIC |
Definition at line 169 of file schema_manager.c.
|
static |
Definition at line 12391 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_WRITE, classobj_free_template(), sm_class::new_, db_objlist::next, NO_ERROR, NULL, and db_objlist::op.
Referenced by sm_delete_class_mop(), and update_class().
|
static |
Definition at line 7412 of file schema_manager.c.
References sm_candidate::alias, sm_resolution::alias, classobj_find_resolution(), ID_NULL, sm_candidate::is_alias, sm_candidate::is_requested, make_candidate_from_component(), sm_candidate::name, sm_component::name, sm_candidate::next, NULL, and sm_candidate::order.
Referenced by get_candidates().
|
static |
Definition at line 10885 of file schema_manager.c.
References allocate_disk_structures_index(), ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, sm_class_constraint::attributes, classobj_cache_class_constraints(), classobj_cache_constraints(), classobj_copy_attribute(), sm_class::constraints, db_ws_alloc(), db_ws_free_and_init, sm_class::dont_decache_constraints_or_flush, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_OBJ_CANT_ASSIGN_OID, er_set(), err, locator_assign_permanent_oid(), locator_flush_class(), locator_update_class(), sm_class_constraint::next, NO_ERROR, NULL, OID_ISTEMP, sm_class::recache_constraints, sm_class_constraint::shared_cons_name, SM_CONSTRAINT_FOREIGN_KEY, SM_IS_CONSTRAINT_INDEX_FAMILY, sm_class_constraint::type, and ws_oid().
Referenced by update_class(), and update_subclasses().
|
static |
Definition at line 10816 of file schema_manager.c.
References allocate_foreign_key(), allocate_index(), allocate_unique_constraint(), sm_class_constraint::asc_desc, assert, sm_class_constraint::attributes, sm_class_constraint::attrs_prefix_length, BTID_IS_NULL, classobj_put_index(), sm_class_constraint::comment, ER_FAILED, error(), sm_class_constraint::filter_predicate, sm_class_constraint::fk_info, sm_class_constraint::func_index_info, sm_class_constraint::index_btid, sm_class_constraint::index_status, sm_class_constraint::name, NO_ERROR, NULL, sm_class::properties, SM_CONSTRAINT_FOREIGN_KEY, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_REVERSE_INDEX, SM_IS_CONSTRAINT_INDEX_FAMILY, SM_IS_CONSTRAINT_UNIQUE_FAMILY, and sm_class_constraint::type.
Referenced by allocate_disk_structures().
|
static |
Definition at line 10733 of file schema_manager.c.
References allocate_index(), ARG_FILE_LINE, sm_class_constraint::asc_desc, assert, sm_class_constraint::attributes, sm_class_constraint::attrs_prefix_length, check_fk_validity(), classobj_find_cons_primary_key(), classobj_find_constraint_by_name(), classobj_is_exist_foreign_key_ref(), classobj_put_foreign_key_ref(), sm_class::constraints, er_errid(), ER_ERROR_SEVERITY, ER_FK_REF_CLASS_HAS_NOT_PK, er_set(), sm_class_constraint::filter_predicate, sm_class_constraint::fk_info, sm_class_constraint::func_index_info, sm_class_constraint::index_btid, sm_class_constraint::index_status, sm_foreign_key_info::name, sm_class_constraint::name, NO_ERROR, NULL, OID_ISNULL, sm_class::properties, sm_class::recache_constraints, sm_foreign_key_info::ref_class_oid, sm_foreign_key_info::ref_class_pk_btid, sm_foreign_key_info::self_btid, sm_foreign_key_info::self_oid, sm_class_constraint::shared_cons_name, sm_ch_name(), SM_CONSTRAINT_FOREIGN_KEY, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_UNIQUE, sm_class_constraint::type, update_foreign_key_ref(), ws_mop(), and ws_oid().
Referenced by allocate_disk_structures_index().
|
static |
Definition at line 10109 of file schema_manager.c.
References ARG_FILE_LINE, ASSERT_ERROR_AND_SET, sm_function_info::attr_index_start, boot_User_volid, btree_add_index(), btree_load_index(), sm_function_info::col_id, collect_hier_class_info(), construct_index_key_domain(), COPY_OID, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SM_INVALID_INDEX_TYPE, ER_SM_INVALID_INDEX_WITH_PREFIX_TYPE, ER_SM_INVALID_PREFIX_LENGTH, ER_WARNING_SEVERITY, error(), sm_function_info::expr_stream, sm_function_info::expr_stream_size, sm_function_info::fi_domain, free_and_init, heap_has_instance(), HFID_COPY, HFID_IS_NULL, i, pr_type::id, sm_attribute::id, db_objlist::next, NO_ERROR, NULL, OID_ISNULL, pr_type_name(), tp_domain::precision, sm_ch_heap(), SM_GET_FILTER_PRED_STREAM, SM_GET_FILTER_PRED_STREAM_SIZE, SM_ONLINE_INDEX_BUILDING_IN_PROGRESS, TP_IS_BIT_TYPE, TP_IS_CHAR_TYPE, tp_valid_indextype(), sm_attribute::type, btid::vfid, vfid::volid, and WS_OID.
Referenced by allocate_disk_structures_index(), allocate_foreign_key(), allocate_unique_constraint(), and sm_exist_index().
|
static |
Definition at line 10580 of file schema_manager.c.
References allocate_index(), ARG_FILE_LINE, sm_class_constraint::asc_desc, assert, sm_class_constraint::attributes, sm_class::attributes, sm_class_constraint::attrs_prefix_length, au_fetch_class_force(), AU_FETCH_READ, BTREE_CONSTRAINT_PRIMARY_KEY, BTREE_CONSTRAINT_UNIQUE, sm_attribute::class_mop, classobj_find_class_constraint(), classobj_find_constraint_by_name(), sm_class::constraints, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SM_INVALID_PROPERTY, ER_SM_INVALID_UNIQUE_IDX_PARTITION, sm_class_constraint::filter_predicate, sm_attribute::flags, sm_class_constraint::func_index_info, i, sm_attribute::id, sm_class_constraint::index_btid, sm_class_constraint::index_status, is_global, sm_class_constraint::name, NO_ERROR, NULL, sm_class_constraint::shared_cons_name, SM_ATTFLAG_PARTITION_KEY, SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, SM_IS_CONSTRAINT_REVERSE_INDEX_FAMILY, sm_is_global_only_constraint(), and sm_class_constraint::type.
Referenced by allocate_disk_structures_index().
|
static |
Definition at line 4335 of file schema_manager.c.
References assert, classobj_find_attribute(), er_errid(), error(), NO_ERROR, NULL, tr_add_cache_trigger(), TR_CACHE_ATTRIBUTE, TR_CACHE_CLASS, tr_drop_cache_trigger(), tr_make_schema_cache(), sm_attribute::triggers, sm_class::triggers, and sm_class::triggers_validated.
Referenced by alter_trigger_hierarchy().
|
static |
Definition at line 4416 of file schema_manager.c.
References alter_trigger_cache(), au_fetch_class_force(), AU_FETCH_UPDATE, AU_FETCH_WRITE, sm_attribute::class_mop, classobj_find_attribute(), error(), mode, db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_class::users, and WS_IS_DELETED.
Referenced by sm_add_trigger(), and sm_drop_trigger().
Definition at line 3670 of file schema_manager.c.
References assert, au_fetch_class_force(), AU_FETCH_READ, sm_method_file::class_mop, er_errid(), sm_class::inheritance, sm_class::method_files, sm_method_file::name, db_objlist::next, sm_method_file::next, NLIST_FIND, NO_ERROR, NULL, and db_objlist::op.
Referenced by sm_clean_class().
|
static |
Definition at line 9341 of file schema_manager.c.
References sm_class::att_ids, sm_class::class_attributes, sm_attribute::class_mop, sm_attribute::header, sm_attribute::id, sm_component::name, sm_component::next, NULL, sm_class::shared, SM_COMPARE_NAMES, and sm_attribute::type.
Referenced by install_new_representation().
Definition at line 9385 of file schema_manager.c.
References sm_class::class_methods, sm_method::class_mop, sm_method::header, sm_method::id, sm_class::method_ids, sm_class::methods, sm_component::name, sm_component::next, NULL, and SM_COMPARE_NAMES.
Referenced by install_new_representation().
|
static |
Definition at line 7853 of file schema_manager.c.
References sm_resolution::alias, sm_resolution::class_mop, classobj_make_resolution(), sm_candidate::name, sm_resolution::name, sm_resolution::name_space, sm_resolution::next, NULL, SM_COMPARE_NAMES, and sm_candidate::source.
Referenced by resolve_candidates().
|
static |
Definition at line 9489 of file schema_manager.c.
References sm_class::att_ids, sm_class::attributes, sm_template::attributes, sm_attribute::class_mop, classobj_filter_components(), sm_attribute::domain, sm_attribute::header, sm_attribute::id, ID_ATTRIBUTE, if(), sm_template::instance_attributes, sm_component::name, sm_component::next, NULL, order_atts_by_alignment(), sm_template::partition_parent_atts, sm_template::shared_attributes, SM_COMPARE_NAMES, tp_domain_match(), TP_EXACT_MATCH, sm_attribute::type, pr_type::variable_p, WS_LIST_APPEND, and WS_LIST_REMOVE.
Referenced by install_new_representation().
|
static |
Definition at line 6942 of file schema_manager.c.
References schema_def::name, sm_template::name, NULL, sm_template::op, sm_get_ch_name(), and sm_candidate::source.
Referenced by check_alias_conflict(), check_alias_domains(), check_attribute_method_overlap(), and resolve_candidates().
|
static |
Definition at line 7726 of file schema_manager.c.
References sm_candidate::alias, candidate_source_name(), ER_SM_ALIAS_COMPONENT_EXISTS, ER_SM_ALIAS_COMPONENT_INHERITED, ER_SM_MULTIPLE_ALIAS, error(), ERROR1, ERROR2, ERROR4, sm_candidate::is_alias, sm_candidate::name, sm_component::name, sm_candidate::next, NO_ERROR, NULL, sm_candidate::obj, sm_template::op, and sm_candidate::source.
Referenced by resolve_candidates().
|
static |
Definition at line 7800 of file schema_manager.c.
References sm_candidate::alias, candidate_source_name(), compare_component_domains(), DC_EQUAL, DC_INCOMPATIBLE, DC_LESS_SPECIFIC, DC_MORE_SPECIFIC, ER_SM_INCOMPATIBLE_DOMAINS, error(), ERROR4, sm_candidate::name, sm_candidate::next, NO_ERROR, NULL, sm_candidate::obj, sm_candidate::origin, and template_classname().
Referenced by resolve_candidates().
|
static |
Definition at line 7682 of file schema_manager.c.
References candidate_source_name(), ER_SM_INCOMPATIBLE_COMPONENTS, error(), ERROR3, ID_CLASS_METHOD, ID_METHOD, sm_candidate::name, sm_candidate::name_space, sm_candidate::next, NO_ERROR, and NULL.
Referenced by resolve_candidates().
|
static |
Definition at line 10366 of file schema_manager.c.
References ARG_FILE_LINE, assert, construct_index_key_domain(), er_errid(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, heap_has_instance(), HFID_IS_NULL, i, sm_attribute::id, locator_check_fk_validity(), NO_ERROR, NULL, sm_ch_heap(), and ws_oid().
Referenced by allocate_foreign_key().
|
static |
Definition at line 11683 of file schema_manager.c.
References sm_template::attributes, sm_class::class_attributes, sm_template::class_attributes, sm_attribute::class_mop, sm_attribute::header, ID_SHARED_ATTRIBUTE, sm_component::name, sm_component::name_space, sm_component::next, NULL, save_previous_value(), sm_class::shared, and SM_COMPARE_NAMES.
Referenced by install_new_representation().
|
static |
Definition at line 8551 of file schema_manager.c.
References sm_resolution::alias, check_resolution_target(), sm_resolution::class_mop, classobj_find_resolution(), classobj_free_resolution(), ER_SM_INVALID_RESOLUTION, error(), ERROR3, sm_resolution::name, sm_resolution::name_space, sm_resolution::next, NO_ERROR, NULL, SM_COMPARE_NAMES, sm_get_ch_name(), and template_classname().
Referenced by filter_resolutions().
|
static |
Definition at line 8477 of file schema_manager.c.
References sm_template::attributes, au_fetch_class_force(), AU_FETCH_READ, sm_template::class_attributes, sm_template::class_methods, sm_resolution::class_mop, classobj_find_component(), error(), ID_INSTANCE, sm_template::inheritance, sm_template::methods, ml_find(), sm_resolution::name, sm_resolution::name_space, sm_class::new_, NO_ERROR, NULL, and SM_FIND_NAME_IN_COMPONENT_LIST.
Referenced by check_invalid_resolutions().
|
static |
Definition at line 9989 of file schema_manager.c.
References ARG_FILE_LINE, sm_class_constraint::attributes, sm_template::attributes, au_fetch_class_force(), AU_FETCH_READ, sm_attribute::class_mop, classobj_find_class_constraint(), classobj_free_class_constraints(), classobj_make_class_constraints(), COPY_OID, er_errid(), ER_ERROR_SEVERITY, ER_OBJ_CANT_ASSIGN_OID, er_set(), error(), HFID_COPY, i, sm_attribute::id, locator_assign_permanent_oid(), sm_class::new_, db_objlist::next, NO_ERROR, NULL, OID_ISTEMP, db_objlist::op, sm_template::properties, sm_ch_heap(), SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, WS_OID, and ws_oid().
Referenced by allocate_index().
|
static |
Definition at line 7180 of file schema_manager.c.
References compare_domains(), DC_EQUAL, DC_INCOMPATIBLE, sm_method_argument::domain, find_argument(), i, NULL, sm_method_signature::num_args, and sm_method::signatures.
Referenced by compare_component_domains().
|
static |
Definition at line 7243 of file schema_manager.c.
References compare_argument_domains(), compare_domains(), d1, DC_EQUAL, DC_INCOMPATIBLE, sm_attribute::domain, sm_method_argument::domain, ID_CLASS_ATTRIBUTE, ID_CLASS_METHOD, ID_METHOD, sm_component::name_space, NULL, sm_method::signatures, and sm_method_signature::value.
Referenced by check_alias_domains(), and resolve_candidates().
|
static |
Definition at line 7050 of file schema_manager.c.
References tp_domain::class_mop, DC_EQUAL, DC_INCOMPATIBLE, DC_LESS_SPECIFIC, DC_MORE_SPECIFIC, find_superclass(), NULL, pr_is_set_type(), TP_DOMAIN_TYPE, tp_Type_null, tp_Type_object, and tp_domain::type.
Referenced by compare_argument_domains(), and compare_component_domains().
|
static |
Definition at line 9824 of file schema_manager.c.
References tp_domain::codeset, tp_domain::collation_id, DB_TYPE_BIT, DB_TYPE_ENUMERATION, DB_TYPE_MIDXKEY, DB_TYPE_NULL, DOM_GET_ENUMERATION, sm_attribute::domain, i, pr_type::id, tp_domain::is_desc, tp_domain::is_parameterized, tp_domain::next, NO_ERROR, NULL, tp_domain::precision, QSTR_IS_ANY_CHAR_OR_BIT, tp_domain::scale, tp_domain_cache(), tp_domain_construct(), tp_domain_copy(), tp_domain_copy_enumeration(), tp_domain_free(), tp_domain_new(), TP_DOMAIN_TYPE, and tp_domain::type.
Referenced by allocate_index(), check_fk_validity(), and sm_load_online_index().
|
static |
Definition at line 10309 of file schema_manager.c.
References BTID_IS_EQUAL, btree_delete_index(), error(), sm_class_constraint::index_btid, sm_class_constraint::next, NO_ERROR, and NULL.
Referenced by sm_drop_index(), and transfer_disk_structures().
Definition at line 3402 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_READ, sm_class::inheritance, db_objlist::next, NO_ERROR, NULL, and db_objlist::op.
Referenced by sm_check_class_domain(), sm_check_object_domain(), and sm_coerce_object_domain().
|
static |
Definition at line 11058 of file schema_manager.c.
References ARG_FILE_LINE, assert, classobj_find_class_constraint(), sm_class::constraints, drop_foreign_key_ref_internal(), ER_ERROR_SEVERITY, ER_GENERIC_ERROR, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), sm_class_constraint::extra_status, free_and_init, NO_ERROR, NULL, SM_CONSTRAINT_FOREIGN_KEY, SM_FLAG_NORMALLY_INITIALIZED, SM_FLAG_TO_BE_REINTIALIZED, and strlen.
Referenced by transfer_disk_structures().
|
static |
Definition at line 11128 of file schema_manager.c.
References ARG_FILE_LINE, assert, sm_class_constraint::attributes, AU_DISABLE, AU_ENABLE, au_fetch_class_force(), AU_FETCH_READ, BTID_IS_EQUAL, sm_attribute::class_mop, classobj_drop_foreign_key_ref(), classobj_find_cons_primary_key(), sm_class::constraints, dbt_abort_class(), dbt_edit_class(), dbt_finish_class(), er_errid(), ER_ERROR_SEVERITY, ER_FK_REF_CLASS_HAS_NOT_PK, er_set(), err, error(), sm_class_constraint::fk_info, sm_class_constraint::index_btid, sm_class::inheritance, sm_foreign_key_info::is_dropped, sm_class_constraint::name, sm_foreign_key_info::next, sm_class_constraint::next, NO_ERROR, NULL, sm_template::properties, sm_foreign_key_info::ref_class_oid, sm_foreign_key_info::self_btid, sm_ch_name(), SM_CONSTRAINT_PRIMARY_KEY, sm_class_constraint::type, update_fk_ref_partitioned_class(), and ws_mop().
Referenced by drop_foreign_key_ref().
|
static |
Definition at line 6712 of file schema_manager.c.
References AU_ALTER, AU_EXECUTE, au_fetch_class(), AU_FETCH_READ, AU_FETCH_UPDATE, AU_SELECT, AU_UPDATE, error(), ID_CLASS_ATTRIBUTE, ID_CLASS_METHOD, ID_METHOD, ID_SHARED_ATTRIBUTE, sm_descriptor::name_space, and NO_ERROR.
Referenced by sm_get_descriptor_component().
|
static |
Definition at line 8340 of file schema_manager.c.
References sm_resolution::alias, classobj_free_resolution(), ID_INSTANCE, if(), sm_resolution::name, sm_resolution::name_space, sm_resolution::next, NULL, sm_template::resolutions, and SM_COMPARE_NAMES.
Referenced by remove_shadowed_resolutions().
|
static |
Definition at line 15936 of file schema_manager.c.
References ARG_FILE_LINE, assert_release, sm_class::attributes, sm_template::attributes, classobj_drop_prop(), classobj_find_class_constraint(), classobj_free_class_constraints(), classobj_get_prop(), classobj_make_class_constraints(), classobj_map_constraint_to_property(), classobj_put_prop(), cleanup(), db_get_set(), db_make_null(), db_make_sequence(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), ER_SM_CONSTRAINT_NOT_FOUND, ER_SM_INVALID_PROPERTY, error(), ERROR1, sm_class_constraint::name, sm_class::new_, sm_class_constraint::next, NO_ERROR, NULL, sm_template::op, pr_clear_value(), sm_class::properties, sm_template::properties, SM_CONSTRAINT_FOREIGN_KEY, SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, sm_is_global_only_constraint(), and sm_class_constraint::type.
Referenced by flatten_properties().
|
static |
Definition at line 8430 of file schema_manager.c.
References sm_resolution::class_mop, classobj_free_resolution(), sm_resolution::next, and NULL.
Referenced by filter_resolutions().
|
static |
Definition at line 8630 of file schema_manager.c.
References assert, check_invalid_resolutions(), sm_template::class_resolutions, classobj_copy_reslist(), sm_template::current, er_errid(), error(), filter_reslist(), ID_CLASS, ID_INSTANCE, NO_ERROR, NULL, remove_shadowed_resolutions(), sm_class::resolutions, and sm_template::resolutions.
Referenced by flatten_template().
|
static |
Definition at line 7158 of file schema_manager.c.
References sm_method_signature::args, sm_method_argument::index, sm_method_argument::next, and NULL.
Referenced by compare_argument_domains().
|
static |
Definition at line 5080 of file schema_manager.c.
References assert, au_fetch_class(), AU_FETCH_READ, AU_SELECT, classobj_find_attribute(), sm_attribute::domain, er_errid(), ER_SM_ATTRIBUTE_NOT_FOUND, error(), ERROR1, NO_ERROR, NULL, sm_check_name(), and sm_filter_domain().
Referenced by sm_att_auto_increment(), sm_att_class(), sm_att_constrained(), sm_att_default_value(), sm_att_fk_constrained(), sm_att_id(), sm_att_in_unique_filter_constraint_predicate(), sm_att_type_id(), and sm_att_unique_constrained().
|
static |
Definition at line 8679 of file schema_manager.c.
References sm_attribute::class_mop, sm_attribute::header, sm_attribute::id, sm_component::name, sm_component::name_space, sm_component::next, NULL, SM_COMPARE_NAMES, and sm_attribute::type.
Referenced by retain_former_ids(), and sm_filter_index_pred_have_invalid_attrs().
|
static |
Definition at line 6980 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_READ, sm_class::inheritance, sm_template::inheritance, sm_class::new_, db_objlist::next, NO_ERROR, NULL, and db_objlist::op.
Referenced by compare_domains().
|
static |
Definition at line 9761 of file schema_manager.c.
References sm_attribute::domain, fixup_self_domain(), tp_domain_cache(), tp_Type_null, tp_Type_object, and sm_attribute::type.
Referenced by fixup_self_reference_domains().
|
static |
Definition at line 9653 of file schema_manager.c.
References sm_template::attributes, sm_template::class_attributes, sm_template::class_methods, sm_attribute::class_mop, sm_method::class_mop, sm_method_file::class_mop, sm_attribute::header, sm_method::header, sm_template::method_files, sm_template::methods, sm_component::next, sm_method_file::next, and NULL.
Referenced by install_new_representation().
Definition at line 9740 of file schema_manager.c.
References sm_method_signature::args, sm_method_argument::domain, fixup_self_domain(), sm_method_argument::next, sm_method_signature::next, NULL, sm_method::signatures, tp_domain_cache(), and sm_method_signature::value.
Referenced by fixup_self_reference_domains().
Definition at line 9722 of file schema_manager.c.
References assert, tp_domain::class_mop, tp_domain::is_cached, tp_domain::next, NULL, tp_domain::setdomain, tp_Type_null, tp_Type_object, and tp_domain::type.
Referenced by fixup_attribute_self_domain(), and fixup_method_self_domains().
|
static |
Definition at line 9778 of file schema_manager.c.
References sm_template::attributes, sm_template::class_attributes, sm_template::class_methods, fixup_attribute_self_domain(), fixup_method_self_domains(), sm_attribute::header, sm_method::header, sm_template::methods, sm_component::next, NULL, and sm_template::shared_attributes.
Referenced by install_new_representation().
|
static |
Definition at line 8169 of file schema_manager.c.
References assert, sm_template::attributes, sm_template::class_attributes, sm_template::class_methods, db_ws_free(), er_errid(), error(), free_candidates(), get_candidates(), ID_ATTRIBUTE, ID_CLASS_ATTRIBUTE, ID_CLASS_METHOD, ID_METHOD, ID_SHARED_ATTRIBUTE, insert_attribute(), insert_method(), make_component_from_candidate(), sm_template::methods, sm_component::name_space, NO_ERROR, NULL, sm_template::op, prune_candidate(), and resolve_candidates().
Referenced by flatten_template().
|
static |
Definition at line 8242 of file schema_manager.c.
References assert, au_fetch_class_force(), AU_FETCH_READ, sm_method_file::class_mop, classobj_copy_methfiles(), classobj_make_method_file(), er_errid(), sm_template::inheritance, sm_class::method_files, sm_template::method_files, sm_method_file::name, sm_class::new_, db_objlist::next, sm_method_file::next, NLIST_FIND, NO_ERROR, NULL, db_objlist::op, and WS_LIST_APPEND.
Referenced by flatten_template().
|
static |
Definition at line 16404 of file schema_manager.c.
References assert, classobj_copy_partition_info(), er_errid(), NO_ERROR, NULL, and sm_template::partition.
Referenced by flatten_template().
|
static |
Definition at line 9009 of file schema_manager.c.
References ARG_FILE_LINE, sm_class_constraint::asc_desc, sm_class_constraint::attributes, sm_class::attributes, sm_template::attributes, sm_class_constraint::attrs_prefix_length, au_fetch_class_force(), AU_FETCH_READ, BTID_COPY, BTID_IS_EQUAL, BTID_SET_NULL, sm_attribute::class_mop, classobj_btid_from_property_value(), classobj_copy_props(), classobj_find_prop_constraint(), classobj_free_class_constraints(), classobj_make_class_constraints(), classobj_map_constraint_to_property(), classobj_put_index(), sm_class_constraint::comment, db_get_set(), db_make_null(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SM_CONSTRAINT_EXISTS, ER_SM_INVALID_PROPERTY, error(), ERROR1, filter_local_constraints(), sm_class_constraint::filter_predicate, sm_class_constraint::fk_info, sm_class_constraint::func_index_info, sm_attribute::header, i, sm_class_constraint::index_btid, sm_class_constraint::index_status, sm_template::inheritance, sm_component::name, sm_class_constraint::name, sm_class::new_, sm_component::next, db_objlist::next, sm_class_constraint::next, NO_ERROR, NULL, db_objlist::op, pr_clear_value(), sm_class::properties, sm_template::properties, set_get_element(), SM_COMPARE_NAMES, SM_CONSTRAINT_FOREIGN_KEY, SM_IS_CONSTRAINT_UNIQUE_FAMILY, sm_is_global_only_constraint(), and sm_class_constraint::type.
Referenced by flatten_template().
|
static |
Definition at line 8306 of file schema_manager.c.
References assert, classobj_copy_query_spec_list(), er_errid(), NO_ERROR, NULL, and sm_template::query_spec.
Referenced by flatten_template().
|
static |
Definition at line 12339 of file schema_manager.c.
References assert, au_fetch_class_force(), AU_FETCH_UPDATE, classobj_free_template(), classobj_make_template(), er_errid(), error(), flatten_template(), db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_ch_name(), and sm_clean_class().
Referenced by sm_delete_class_mop(), and update_class().
|
static |
Definition at line 9216 of file schema_manager.c.
References assert, sm_template::class_type, classobj_free_template(), classobj_make_template(), sm_template::current, er_errid(), error(), filter_resolutions(), flatten_components(), flatten_method_files(), flatten_partition_info(), flatten_properties(), flatten_query_spec_lists(), flatten_trigger_cache(), ID_CLASS, ID_INSTANCE, sm_template::inheritance, sm_template::loader_commands, ml_copy(), ml_remove(), sm_template::name, NO_ERROR, NULL, sm_template::op, retain_former_ids(), and ws_copy_string().
Referenced by flatten_subclasses(), and update_class().
|
static |
Definition at line 8911 of file schema_manager.c.
References assert, au_fetch_class_force(), AU_FETCH_READ, er_errid(), error(), sm_template::inheritance, sm_class::new_, db_objlist::next, NO_ERROR, NULL, db_objlist::op, TR_CACHE_CLASS, tr_copy_schema_cache(), tr_empty_schema_cache(), tr_free_schema_cache(), tr_make_schema_cache(), tr_merge_schema_cache(), sm_class::triggers, and sm_template::triggers.
Referenced by flatten_template().
|
static |
Definition at line 7360 of file schema_manager.c.
References db_ws_free(), sm_candidate::next, and NULL.
Referenced by flatten_components().
|
static |
Definition at line 7551 of file schema_manager.c.
References add_candidate(), sm_template::attributes, au_fetch_class_force(), AU_FETCH_READ, sm_class::class_attributes, sm_template::class_attributes, sm_class::class_methods, sm_template::class_methods, sm_template::class_resolutions, for(), sm_attribute::header, ID_CLASS, sm_template::inheritance, sm_class::methods, sm_template::methods, sm_class::new_, sm_component::next, db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_template::op, sm_attribute::order_link, sm_class::ordered_attributes, and sm_template::resolutions.
Referenced by flatten_components().
|
static |
Definition at line 11264 of file schema_manager.c.
References ARG_FILE_LINE, sm_class_constraint::attributes, au_fetch_class_force(), AU_FETCH_READ, sm_attribute::class_mop, classobj_find_class_constraint(), sm_class::constraints, ER_ERROR_SEVERITY, er_set(), ER_SM_INVALID_PROPERTY, error(), sm_class_constraint::index_btid, sm_class_constraint::name, NO_ERROR, NULL, and sm_class_constraint::type.
Referenced by transfer_disk_structures().
|
static |
Definition at line 8104 of file schema_manager.c.
References sm_attribute::header, sm_component::next, NULL, and sm_attribute::order.
Referenced by flatten_components().
Definition at line 8126 of file schema_manager.c.
References sm_method::header, sm_component::next, NULL, and sm_method::order.
Referenced by flatten_components().
|
static |
Definition at line 11813 of file schema_manager.c.
References assert, assign_attribute_id(), assign_method_id(), build_storage_order(), check_inherited_attributes(), sm_template::class_attributes, sm_template::class_methods, sm_class::class_type, classobj_install_template(), DECACHE, er_errid(), ER_FAILED, ER_SM_CORRUPTED, error(), ERROR0, fixup_component_classes(), fixup_self_reference_domains(), sm_attribute::header, sm_method::header, invalidate_unused_triggers(), locator_flush_all_instances(), locator_update_class(), sm_template::methods, sm_class::methods_loaded, sm_component::next, NO_ERROR, db_object::no_objects, NULL, sm_template::shared_attributes, SM_CLASS_CT, sm_reset_descriptors(), SM_VCLASS_CT, sm_class::stats, stats_free_statistics(), transfer_disk_structures(), vid_flush_all_instances(), ws_class_has_cached_objects(), and WS_SET_NO_OBJECTS.
Referenced by update_class(), and update_subclasses().
|
static |
Definition at line 11749 of file schema_manager.c.
References sm_class::class_attributes, sm_template::class_attributes, sm_attribute::header, sm_attribute::id, sm_template::instance_attributes, sm_component::next, NULL, sm_attribute::order_link, sm_class::ordered_attributes, tr_delete_schema_cache(), and sm_attribute::triggers.
Referenced by install_new_representation().
|
static |
Definition at line 11236 of file schema_manager.c.
References sm_class_constraint::attributes, sm_attribute::class_mop, is_global, NO_ERROR, NULL, and sm_is_global_only_constraint().
Referenced by transfer_disk_structures().
|
static |
Definition at line 12262 of file schema_manager.c.
References error(), lock_subclasses_internal(), db_objlist::next, NO_ERROR, NULL, and db_objlist::op.
Referenced by sm_delete_class_mop(), and update_class().
|
static |
Definition at line 12195 of file schema_manager.c.
References assert, au_fetch_class_force(), AU_FETCH_WRITE, db_ws_alloc(), er_errid(), ER_SM_CYCLE_DETECTED, ER_SM_INVALID_CLASS, error(), ERROR0, ERROR2, ml_find(), sm_template::name, db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_get_ch_name(), sm_class::users, and WS_IS_DELETED.
Referenced by lock_subclasses().
|
static |
Definition at line 11986 of file schema_manager.c.
References ASSERT_ERROR, au_fetch_class(), AU_FETCH_READ, AU_FETCH_WRITE, AU_SELECT, error(), sm_class::inheritance, sm_template::inheritance, ml_append(), ml_find(), db_objlist::next, NO_ERROR, NULL, and db_objlist::op.
Referenced by lock_supers_drop(), and update_class().
|
static |
Definition at line 12118 of file schema_manager.c.
References ASSERT_ERROR, au_fetch_class(), AU_FETCH_WRITE, AU_SELECT, error(), sm_class::inheritance, lock_supers(), db_objlist::next, NO_ERROR, NULL, and db_objlist::op.
Referenced by sm_delete_class_mop().
|
static |
Definition at line 12514 of file schema_manager.c.
References assert, DB_FETCH_WRITE, er_errid(), error(), LC_CLASS, LC_CLASSNAME_ERROR, LC_FETCH_CURRENT_VERSION, LC_PREF_FLAG_LOCK, locator_fetch_mode_to_lock(), locator_lockhint_classes(), sm_template::name, NO_ERROR, NULL, NULL_LOCK, and sm_ch_name().
Referenced by locator_guess_sub_classes(), sm_delete_class_mop(), and update_class().
|
static |
Definition at line 7322 of file schema_manager.c.
References sm_candidate::alias, db_object::class_mop, db_ws_alloc(), ID_CLASS_METHOD, ID_METHOD, sm_candidate::is_alias, sm_candidate::is_requested, sm_candidate::name, sm_component::name, sm_candidate::name_space, sm_component::name_space, sm_candidate::next, NULL, sm_candidate::obj, sm_candidate::order, sm_candidate::origin, and sm_candidate::source.
Referenced by add_candidate().
|
static |
Definition at line 7464 of file schema_manager.c.
References classobj_copy_attribute(), classobj_copy_method(), classobj_free_attribute(), classobj_free_method(), sm_attribute::flags, sm_attribute::id, sm_method::id, ID_CLASS_METHOD, ID_METHOD, sm_candidate::is_alias, sm_candidate::name, sm_component::name, sm_component::name_space, NULL, sm_candidate::obj, sm_candidate::order, sm_attribute::order, sm_method::order, SM_ATTFLAG_NEW, sm_candidate::source, ws_copy_string(), and ws_free_string().
Referenced by flatten_components().
|
static |
Definition at line 9429 of file schema_manager.c.
References pr_type::alignment, sm_attribute::domain, sm_attribute::header, sm_component::next, NULL, tp_domain_disk_size(), sm_attribute::type, WS_LIST_APPEND, and WS_LIST_REMOVE.
Referenced by build_storage_order().
|
static |
Definition at line 7382 of file schema_manager.c.
References sm_candidate::name, nlist_filter(), NULL, and SM_COMPARE_NAMES.
Referenced by flatten_components().
Definition at line 10342 of file schema_manager.c.
References HFID_IS_NULL, locator_remove_class_from_index(), and NO_ERROR.
Referenced by transfer_disk_structures().
Definition at line 12916 of file schema_manager.c.
References sm_class::class_attributes, error(), sm_attribute::header, sm_component::next, NO_ERROR, NULL, sm_attribute::order_link, sm_class::ordered_attributes, tr_delete_triggers_for_class(), sm_attribute::triggers, and sm_class::triggers.
Referenced by sm_delete_class_mop().
|
static |
Definition at line 8396 of file schema_manager.c.
References sm_template::attributes, sm_template::class_attributes, sm_template::class_methods, filter_component_resolutions(), ID_CLASS, ID_INSTANCE, sm_template::methods, sm_component::name, sm_component::next, and NULL.
Referenced by filter_resolutions().
|
static |
Definition at line 7899 of file schema_manager.c.
References sm_candidate::alias, auto_resolve_conflict(), candidate_source_name(), check_alias_conflict(), check_alias_domains(), check_attribute_method_overlap(), compare_component_domains(), DC_EQUAL, DC_INCOMPATIBLE, DC_LESS_SPECIFIC, DC_MORE_SPECIFIC, ER_SM_ATTRIBUTE_NAME_CONFLICT, ER_SM_INCOMPATIBLE_ALIAS_LOCAL_SUB, ER_SM_INCOMPATIBLE_ALIAS_SUBSTITUTE, ER_SM_INCOMPATIBLE_DOMAINS, ER_SM_INCOMPATIBLE_SHADOW, ER_SM_LESS_SPECIFIC_ALIAS_SUBSTITUTE, ER_SM_MISSING_ALIAS_SUBSTITUTE, ER_SM_RESOLUTION_OVERRIDE, error(), ERROR3, ERROR4, sm_candidate::is_requested, sm_candidate::name, sm_candidate::name_space, sm_candidate::next, NO_ERROR, NULL, sm_candidate::obj, sm_template::op, sm_candidate::origin, sm_template::resolutions, sm_resolution_space(), sm_candidate::source, and template_classname().
Referenced by flatten_components().
|
static |
Definition at line 8729 of file schema_manager.c.
References sm_class::attributes, sm_template::attributes, au_fetch_class_force(), AU_FETCH_READ, sm_class::class_attributes, sm_template::class_attributes, sm_attribute::class_mop, classobj_find_attribute_list(), sm_template::current, find_matching_att(), sm_attribute::header, sm_attribute::id, sm_component::name, sm_class::new_, sm_component::next, NO_ERROR, NULL, sm_template::op, sm_class::partition, sm_partition::pname, and SM_COMPARE_NAMES.
Referenced by flatten_template().
|
static |
Definition at line 11653 of file schema_manager.c.
References sm_default_value::default_expr, sm_attribute::default_value, sm_attribute::on_update_default_expr, sm_default_value::original_value, pr_clear_value(), pr_clone_value(), and sm_default_value::value.
Referenced by check_inherited_attributes().
int sc_set_current_schema | ( | MOP | user | ) |
Definition at line 478 of file schema_manager.c.
References au_get_user_name(), ER_FAILED, error(), intl_identifier_lower(), schema_def::name, NO_ERROR, NULL, schema_def::owner, and ws_free_string().
Referenced by au_set_user().
int sm_active_triggers | ( | MOP | class_mop, |
SM_CLASS * | class_, | ||
DB_TRIGGER_EVENT | event_type | ||
) |
Definition at line 4181 of file schema_manager.c.
References sm_class::class_attributes, db_set_read_fetch_instance_version(), sm_class::has_active_triggers, sm_attribute::header, LC_FETCH_DIRTY_VERSION, sm_component::next, NULL, sm_attribute::order_link, sm_class::ordered_attributes, TM_TRAN_READ_FETCH_VERSION, tr_active_schema_cache(), TR_EVENT_ALL, tr_get_execution_state(), sm_attribute::triggers, sm_class::triggers, and sm_class::triggers_validated.
Referenced by obj_set_att(), obt_apply_assignments(), and sm_class_has_triggers().
int sm_add_constraint | ( | MOP | classop, |
DB_CONSTRAINT_TYPE | constraint_type, | ||
const char * | constraint_name, | ||
const char ** | att_names, | ||
const int * | asc_desc, | ||
const int * | attrs_prefix_length, | ||
int | class_attributes, | ||
SM_PREDICATE_INFO * | filter_index, | ||
SM_FUNCTION_INFO * | function_index, | ||
const char * | comment, | ||
SM_INDEX_STATUS | index_status | ||
) |
Definition at line 14618 of file schema_manager.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, AU_ALTER, AU_INDEX, sm_template::current, DB_CONSTRAINT_INDEX, DB_CONSTRAINT_NOT_NULL, DB_CONSTRAINT_PRIMARY_KEY, DB_CONSTRAINT_REVERSE_INDEX, DB_CONSTRAINT_REVERSE_UNIQUE, DB_CONSTRAINT_UNIQUE, DB_IS_CONSTRAINT_UNIQUE_FAMILY, DB_NOT_PARTITIONED_CLASS, DB_PARTITION_CLASS, DB_PARTITIONED_CLASS, do_check_fk_constraints(), ER_ERROR_SEVERITY, ER_LK_UNILATERALLY_ABORTED, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_SM_INDEX_PREFIX_LENGTH_ON_PARTITIONED_CLASS, ER_SM_ONLINE_INDEX_ON_HIERARCHY, ER_TM_SERVER_DOWN_UNILATERALLY_ABORTED, error(), ERROR0, free_and_init, i, sm_class::inheritance, IX_LOCK, db_object::lock, NO_ERROR, NULL, SM_ADD_CONSTRAINT_SAVEPOINT_NAME, sm_add_secondary_index_on_partition(), sm_load_online_index(), SM_NORMAL_INDEX, SM_ONLINE_INDEX_BUILDING_IN_PROGRESS, sm_partitioned_class_type(), sm_update_class(), sm_update_class_with_auth(), sm_update_statistics(), smt_add_constraint(), smt_change_constraint_status(), smt_check_index_exist(), smt_edit_class_mop(), smt_quit(), STATS_WITH_SAMPLING, tran_abort_upto_system_savepoint(), tran_system_savepoint(), and sm_class::users.
Referenced by create_or_drop_index_helper(), db_add_constraint(), do_alter_clause_change_attribute(), do_alter_index_rebuild(), do_copy_indexes(), do_create_partition_constraint(), do_recreate_att_constraints(), do_recreate_renamed_class_indexes(), do_recreate_saved_indexes(), sm_add_secondary_index_on_partition(), and sm_truncate_class().
|
static |
Definition at line 14462 of file schema_manager.c.
References ARG_FILE_LINE, ASSERT_ERROR_AND_SET, do_recreate_filter_index_constr(), do_recreate_func_index_constr(), ER_ERROR_SEVERITY, ER_LK_UNILATERALLY_ABORTED, er_set(), ER_SM_INDEX_EXISTS, error(), free_and_init, i, NO_ERROR, NULL, sm_predicate_info::num_attrs, sm_add_constraint(), sm_exist_index(), sm_free_filter_index_info(), sm_free_function_index_info(), sm_get_ch_name(), sm_save_filter_index_info(), sm_save_function_index_info(), tran_abort_upto_system_savepoint(), tran_system_savepoint(), and UNIQUE_PARTITION_SAVEPOINT_INDEX.
Referenced by sm_add_constraint().
void sm_add_static_method | ( | const char * | name, |
void(*)() | function | ||
) |
Definition at line 533 of file schema_manager.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), static_method::function, static_method::name, static_method::next, NULL, Static_method_table, and strlen.
Referenced by db_link_static_methods().
int sm_add_trigger | ( | DB_OBJECT * | classop, |
const char * | attribute, | ||
int | class_attribute, | ||
DB_OBJECT * | trigger | ||
) |
Definition at line 4494 of file schema_manager.c.
References alter_trigger_hierarchy(), AU_ALTER, au_fetch_class(), AU_FETCH_UPDATE, error(), NO_ERROR, and NULL.
Referenced by tr_create_trigger().
Definition at line 5437 of file schema_manager.c.
References find_attribute_op(), sm_attribute::flags, NO_ERROR, NULL, rc, and SM_ATTFLAG_AUTO_INCREMENT.
Referenced by check_for_cons().
Definition at line 5246 of file schema_manager.c.
References tp_domain::class_mop, sm_attribute::domain, find_attribute_op(), NO_ERROR, NULL, sm_filter_domain(), tp_Type_object, and tp_domain::type.
Referenced by db_get_attribute_class().
int sm_att_constrained | ( | MOP | classop, |
const char * | name, | ||
SM_ATTRIBUTE_FLAG | cons | ||
) |
Definition at line 5507 of file schema_manager.c.
References classobj_get_cached_constraint(), sm_attribute::constraints, find_attribute_op(), sm_attribute::flags, NO_ERROR, NULL, rc, SM_IS_ATTFLAG_INDEX_FAMILY, and SM_MAP_INDEX_ATTFLAG_TO_CONSTRAINT.
Referenced by check_for_cons(), do_add_attribute_from_select_column(), and update_check_for_constraints().
int sm_att_default_value | ( | MOP | classop, |
const char * | name, | ||
DB_VALUE * | value, | ||
DB_DEFAULT_EXPR ** | default_expr, | ||
DB_DEFAULT_EXPR_TYPE ** | on_update_expr | ||
) |
Definition at line 5462 of file schema_manager.c.
References assert, db_value_clear(), db_value_clone(), sm_default_value::default_expr, sm_attribute::default_value, error(), find_attribute_op(), NO_ERROR, NULL, sm_attribute::on_update_default_expr, and sm_default_value::value.
Referenced by do_add_attribute_from_select_column().
Definition at line 5537 of file schema_manager.c.
References db_attribute_is_foreign_key(), find_attribute_op(), NO_ERROR, and NULL.
Referenced by create_or_drop_index_helper().
Definition at line 5175 of file schema_manager.c.
References find_attribute_op(), sm_attribute::id, NO_ERROR, and NULL.
Referenced by make_cst_item_value(), pt_to_insert_xasl(), pt_to_merge_insert_xasl(), pt_to_merge_update_xasl(), pt_to_update_xasl(), qo_get_attr_info(), and qo_get_index_info().
Definition at line 5634 of file schema_manager.c.
References assert, sm_predicate_info::att_ids, sm_class::constraints, sm_class_constraint::filter_predicate, find_attribute_op(), i, sm_attribute::id, sm_class_constraint::next, NO_ERROR, NULL, sm_predicate_info::num_attrs, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, and sm_class_constraint::type.
int sm_att_info | ( | MOP | classop, |
const char * | name, | ||
int * | idp, | ||
TP_DOMAIN ** | domainp, | ||
int * | sharedp, | ||
int | class_attr | ||
) |
Definition at line 5280 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, classobj_find_attribute(), sm_attribute::domain, ER_SM_ATTRIBUTE_NOT_FOUND, error(), sm_attribute::header, sm_attribute::id, ID_SHARED_ATTRIBUTE, sm_component::name_space, NO_ERROR, NULL, and sm_filter_domain().
Referenced by db_object_describe(), get_attribute_number(), pt_fold_const_expr(), and pt_to_regu_attr_descr().
Definition at line 5199 of file schema_manager.c.
References DB_TYPE_NULL, find_attribute_op(), pr_type::id, pr_type::name, NO_ERROR, NULL, pr_type_from_id(), and sm_attribute::type.
Referenced by db_get_attribute_type(), db_object_describe(), db_object_fetch(), and qo_get_attr_info().
Definition at line 5608 of file schema_manager.c.
References classobj_has_unique_constraint(), sm_attribute::constraints, find_attribute_op(), NO_ERROR, NULL, and rc.
Referenced by check_for_cons(), and create_or_drop_index_helper().
|
static |
Definition at line 1038 of file schema_manager.c.
References assert, db_ws_alloc(), db_ws_free(), er_errid(), error(), sm_method_signature::function_name, i, method_link::method, method_link::namelist_index, method_link::next, nlist(), NO_ERROR, NULL, sm_method::signatures, SM_MAX_IDENTIFIER_LENGTH, ws_copy_string(), and WS_LIST_LENGTH.
Referenced by sm_free_function_nlist().
void sm_bump_global_schema_version | ( | void | ) |
Definition at line 6232 of file schema_manager.c.
References global_schema_version.
Referenced by tf_disk_to_class().
void sm_bump_local_schema_version | ( | void | ) |
Definition at line 6210 of file schema_manager.c.
References local_schema_version.
Referenced by au_grant(), au_perform_login(), au_revoke(), sm_delete_class_mop(), and update_class().
Definition at line 4846 of file schema_manager.c.
References sm_class_header::ch_heap, and NULL.
Referenced by allocate_index(), check_fk_validity(), collect_hier_class_info(), compactdb_start(), disk_to_class(), disk_update_instance(), do_reclaim_class_addresses(), extract_objects(), locator_add_oidset_object(), locator_assign_permanent_oid(), locator_create_heap_if_needed(), locator_flush_all_instances(), locator_flush_for_multi_update(), locator_fun_get_all_mops(), locator_mflush(), locator_remove_class(), process_class(), pt_to_func_pred(), pt_to_insert_xasl(), pt_to_merge_insert_xasl(), pt_to_pred_with_context(), put_class_attributes(), sm_get_ch_heap(), sm_load_online_index(), sm_truncate_using_delete(), and transfer_disk_structures().
Definition at line 4815 of file schema_manager.c.
References assert, sm_class_header::ch_name, sm_class_header::ch_type, NULL, SM_META_CLASS, and SM_META_ROOT.
Referenced by allocate_foreign_key(), check_domain_class_type(), classobj_cache_class_constraints(), classobj_class_size(), classobj_copy_constraint_like(), classobj_filter_components(), classobj_make_template_like(), compactdb_start(), object_printer::describe_constraint(), disk_to_class(), do_coalesce_partition_pre(), do_copy_indexes(), do_create_partition_constraint(), do_drop_partition_list(), do_promote_partition(), do_promote_partition_list(), do_reclaim_class_addresses(), do_recreate_renamed_class_indexes(), do_remove_partition_pre(), do_rename_partition(), drop_foreign_key_ref_internal(), extract_objects(), flatten_subclasses(), get_desc_old(), get_old(), help_describe_mop(), object_description::init(), class_description::init(), is_protected_class(), la_flush_repl_items(), locator_assign_permanent_oid(), locator_remove_class(), lockhint_subclasses(), obt_apply_assignments(), obt_check_missing_assignments(), process_class(), process_value(), put_class_attributes(), put_class_varinfo(), root_size(), root_to_disk(), sl_print_select(), sl_write_insert_sql(), sl_write_update_sql(), sm_check_index_exist(), sm_delete_class_mop(), sm_get_ch_name(), sm_rename_class(), sm_save_constraint_info(), smt_check_foreign_key(), smt_is_change_status_allowed(), tf_class_size(), transfer_disk_structures(), unloaddb(), update_class(), update_foreign_key_ref(), ws_add_classname(), ws_cache(), ws_clear_hints(), ws_decache(), ws_drop_classname(), ws_dump(), and ws_set_lock().
Definition at line 4869 of file schema_manager.c.
References sm_class_header::ch_rep_dir, and NULL.
Referenced by au_fetch_class_internal(), disk_to_class(), disk_to_root(), locator_create_heap_if_needed(), put_class_attributes(), root_to_disk(), and sm_get_ch_heap().
Definition at line 12284 of file schema_manager.c.
References assert, catalog_check_rep_dir(), sm_class_header::ch_rep_dir, COPY_OID, er_errid(), ER_HEAP_NODATA_NEWADDRESS, error(), sm_class::header, NO_ERROR, OID_EQ, OID_ISNULL, OID_ISTEMP, and WS_OID.
Referenced by au_fetch_class_internal().
Definition at line 3576 of file schema_manager.c.
References sm_class::attributes, au_fetch_class_force(), AU_FETCH_READ, sm_class::class_attributes, tp_domain::class_mop, sm_attribute::domain, domain_search(), sm_attribute::header, sm_attribute::id, sm_component::next, NO_ERROR, NULL, sm_class::shared, sm_filter_domain(), tp_Type_object, and tp_domain::type.
Referenced by obt_assign_obt(), tp_domain_select(), tp_domain_select_type(), and tp_value_cast_internal().
|
static |
Definition at line 14439 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_INDEX, classobj_check_index_exist(), sm_class::constraints, DB_IS_CONSTRAINT_INDEX_FAMILY, error(), NO_ERROR, and sm_ch_name().
Referenced by sm_exist_index().
int sm_check_name | ( | const char * | name | ) |
Definition at line 2141 of file schema_manager.c.
References ARG_FILE_LINE, er_set(), ER_SM_INVALID_NAME, ER_WARNING_SEVERITY, and NULL.
Referenced by add_resolution(), checksumdb(), def_class_internal(), find_any(), find_attribute_op(), find_method(), sm_rename_class(), smt_add_attribute_any(), smt_add_method_any(), smt_change_attribute(), smt_copy_class(), smt_edit_class_mop(), smt_find_attribute(), smt_rename_any(), and tr_process_name().
Definition at line 3438 of file schema_manager.c.
References au_fetch_instance(), AU_FETCH_READ, AU_SELECT, tp_domain::class_mop, domain_search(), NULL, TM_TRAN_READ_FETCH_VERSION, tp_Type_object, tp_domain::type, ws_class_mop(), and WS_MOP_IS_NULL.
Referenced by tp_domain_select().
int sm_check_reuse_oid_class | ( | MOP | op | ) |
Definition at line 3049 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_READ, error(), sm_class::flags, NO_ERROR, NULL, and SM_CLASSFLAG_REUSE_OID.
Referenced by pt_is_reference_to_reusable_oid().
int sm_class_check_uniques | ( | MOP | classop | ) |
Definition at line 5673 of file schema_manager.c.
References ARG_FILE_LINE, assert, au_fetch_class(), AU_FETCH_READ, AU_SELECT, btree_class_test_unique(), sm_class::constraints, er_errid(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, sm_class_constraint::index_btid, sm_class_constraint::next, NO_ERROR, NULL, OR_ALIGNED_BUF, OR_ALIGNED_BUF_START, OR_BTID_ALIGNED_SIZE, or_pack_btid(), SM_IS_CONSTRAINT_UNIQUE_FAMILY, and sm_class_constraint::type.
Referenced by sm_flush_for_multi_update().
SM_CLASS_CONSTRAINT* sm_class_constraints | ( | MOP | classop | ) |
Definition at line 5015 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, sm_class::constraints, error(), NO_ERROR, and NULL.
Referenced by build_query_graph_function_index(), get_index_type_qualifiers(), graph_size_for_entity(), pt_check_show_index(), pt_mark_function_index_expression(), qo_find_node_indexes(), and qo_get_attr_info().
int sm_class_has_triggers | ( | DB_OBJECT * | classop, |
int * | status_ptr, | ||
DB_TRIGGER_EVENT | event_type | ||
) |
Definition at line 4268 of file schema_manager.c.
References ARG_FILE_LINE, assert, au_fetch_class(), AU_FETCH_READ, AU_SELECT, er_errid(), ER_OBJ_INVALID_ARGUMENT, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, error(), NO_ERROR, NULL, and sm_active_triggers().
Referenced by delete_real_class(), do_insert_checks(), do_prepare_delete(), do_prepare_merge(), do_prepare_update(), insert_local(), is_server_insert_allowed(), is_server_update_allowed(), and pt_check_alter().
int sm_class_has_unique_constraint | ( | MOBJ | classobj, |
MOP | classop, | ||
bool | check_subclasses, | ||
bool * | has_unique | ||
) |
Definition at line 5560 of file schema_manager.c.
References assert, AU_DISABLE, AU_ENABLE, au_fetch_class_by_classmop(), AU_FETCH_READ, AU_SELECT, classobj_has_class_unique_constraint(), sm_class::constraints, error(), db_objlist::next, NO_ERROR, NULL, db_objlist::op, rc, sm_class_has_unique_constraint(), and sm_class::users.
Referenced by locator_mflush(), sm_class_has_unique_constraint(), and update_check_for_constraints().
Definition at line 3725 of file schema_manager.c.
References annotate_method_files(), sm_class::attributes, sm_class::class_attributes, sm_attribute::domain, error(), sm_attribute::header, sm_component::next, NO_ERROR, NULL, sm_class::post_load_cleanup, sm_class::shared, and sm_filter_domain().
Referenced by flatten_subclasses(), class_description::init(), and smt_edit_class_mop().
Definition at line 3491 of file schema_manager.c.
References au_fetch_class_force(), au_fetch_instance(), AU_FETCH_READ, AU_SELECT, tp_domain::class_mop, sm_class::class_type, domain_search(), NO_ERROR, NULL, SM_CLASS_CT, SM_VCLASS_CT, TM_TRAN_READ_FETCH_VERSION, tp_Type_object, tp_domain::type, vid_get_referenced_mop(), ws_class_mop(), and WS_MOP_IS_NULL.
Referenced by tp_value_cast_internal().
|
static |
Definition at line 12412 of file schema_manager.c.
References assert, sm_class_constraint::attributes, sm_attribute::class_mop, and NULL.
Referenced by sm_is_possible_to_recreate_constraint().
|
static |
Definition at line 683 of file schema_manager.c.
References char_isspace(), i, NULL, and strlen.
Referenced by sm_split_loader_commands().
Definition at line 2036 of file schema_manager.c.
References sm_class_header::ch_heap, sm_class_header::ch_name, sm_class_header::ch_obj_header, sm_class_header::ch_rep_dir, sm_class_header::ch_type, ws_object_header::chn, vfid::fileid, sm_class::header, hfid::hpgid, locator_add_root(), OID_SET_NULL, SM_META_ROOT, sm_Root_class_name, hfid::vfid, and vfid::volid.
Referenced by boot_initialize_client().
int sm_decache_instances_after_query_executed_with_commit | ( | MOP | class_mop | ) |
Definition at line 5978 of file schema_manager.c.
References assert, DB_FETCH_READ, ER_FAILED, sm_class::flags, locator_fetch_class(), locator_is_root(), db_objlist::next, NO_ERROR, NULL, db_object::object, db_objlist::op, sm_class::partition, SM_CLASSFLAG_SYSTEM, sm_decache_mop(), sm_class::users, ws_disconnect_deleted_instances(), ws_find(), WS_FIND_MOP_DELETED, WS_ISDIRTY, and ws_map_class().
Referenced by build_xasl_for_server_delete(), do_execute_delete(), do_execute_merge(), do_execute_update(), do_insert_at_server(), and update_at_server().
int sm_decache_mop | ( | MOP | mop, |
void * | info | ||
) |
Definition at line 5958 of file schema_manager.c.
References NO_ERROR, vid_decache_instance(), ws_decache(), and WS_ISVID.
Referenced by locator_mflush(), and sm_decache_instances_after_query_executed_with_commit().
|
static |
Definition at line 14083 of file schema_manager.c.
References ARG_FILE_LINE, assert, crypt_md5_buffer_hex(), DB_CONSTRAINT_FOREIGN_KEY, DB_CONSTRAINT_INDEX, DB_CONSTRAINT_NOT_NULL, DB_CONSTRAINT_PRIMARY_KEY, DB_CONSTRAINT_REVERSE_INDEX, DB_CONSTRAINT_REVERSE_UNIQUE, DB_CONSTRAINT_UNIQUE, DB_IS_CONSTRAINT_REVERSE_INDEX_FAMILY, DB_MAX_IDENTIFIER_LENGTH, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SM_INVALID_DEF_CONSTRAINT_NAME_PARAMS, error(), ERROR0, free_and_init, i, intl_identifier_fix(), intl_identifier_lower(), intl_identifier_lower_string_size(), MAX_ATTR_IN_AUTO_GEN_NAME, schema_def::name, NO_ERROR, NULL, and strlen.
Referenced by sm_produce_constraint_name().
Definition at line 13019 of file schema_manager.c.
References abort_subclasses(), assert, AU_ALTER, au_delete_auth_of_dropping_table(), AU_DISABLE, AU_ENABLE, au_fetch_class(), AU_FETCH_WRITE, sm_attribute::auto_increment, sm_class::class_type, classobj_find_cons_primary_key(), classobj_free_template(), classobj_is_pk_referred(), classobj_make_template(), sm_class::constraints, COPY_OID, DB_FETCH_WRITE, db_get(), db_get_string(), DB_PARTITIONED_CLASS, db_value_clear(), DECACHE, do_drop_partitioned_class(), er_errid(), ER_FAILED, ER_FK_CANT_DROP_PK_REFERRED, ER_LK_UNILATERALLY_ABORTED, ER_OBJ_NOT_A_CLASS, ER_TM_SERVER_DOWN_UNILATERALLY_ABORTED, error(), ERROR0, ERROR2, sm_class_constraint::fk_info, flatten_subclasses(), sm_class::inheritance, is_class(), locator_flush_all_instances(), locator_is_class(), locator_remove_class(), lock_subclasses(), lock_supers_drop(), lockhint_subclasses(), ml_copy(), ml_free(), sm_class_constraint::name, NO_ERROR, NULL, obj_delete(), sm_attribute::order_link, sm_class::ordered_attributes, remove_class_triggers(), serial_decache(), sm_bump_local_schema_version(), sm_ch_name(), SM_CLASS_CT, sm_delete_class_mop(), sm_drop_cascade_foreign_key(), SM_DROP_CLASS_MOP_SAVEPOINT_NAME, sm_find_class(), sm_get_ch_name(), sm_partitioned_class_type(), SM_VCLASS_CT, tran_abort_upto_system_savepoint(), tran_system_savepoint(), transfer_disk_structures(), UNIQUE_PARTITION_SAVEPOINT_DROP, update_subclasses(), update_supers_drop(), sm_class::users, vid_flush_all_instances(), ws_identifier(), ws_mark_instances_deleted(), and ws_remove_resident_class().
Referenced by db_drop_class_ex(), do_coalesce_partition_post(), do_drop_partition_list(), do_drop_partitioned_class(), do_remove_partition_post(), do_reorganize_partition_post(), and sm_delete_class_mop().
void sm_delete_static_method | ( | const char * | name | ) |
Definition at line 587 of file schema_manager.c.
References free_and_init, static_method::name, static_method::next, and NULL.
Referenced by db_unlink_static_methods().
int sm_destroy_representations | ( | MOP | op | ) |
Definition at line 3347 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_UPDATE, classobj_free_representation(), error(), NO_ERROR, NULL, sm_class::representations, and ws_list_free().
Referenced by compactdb_start(), and process_class().
SM_DOMAIN* sm_domain_alloc | ( | ) |
Definition at line 16701 of file schema_manager.c.
Referenced by pt_get_src_domain(), pt_set_domain_class_list(), and sm_domain_copy().
Definition at line 16714 of file schema_manager.c.
References free_and_init, tp_domain::next, NULL, tp_domain::setdomain, sm_domain_alloc(), sm_domain_copy(), and sm_domain_free().
Referenced by db_cp_query_type(), db_cp_query_type_helper(), db_init_query_result(), db_object_describe(), or_unpack_query_format(), and sm_domain_copy().
void sm_domain_free | ( | SM_DOMAIN * | ptr | ) |
Definition at line 16690 of file schema_manager.c.
References free_and_init, tp_domain::next, NULL, tp_domain::setdomain, and sm_domain_free().
Referenced by db_free_query_format(), db_unpack_prepare_info(), sm_domain_copy(), and sm_domain_free().
void sm_downcase_name | ( | const char * | name, |
char * | buf, | ||
int | maxlen | ||
) |
Definition at line 2168 of file schema_manager.c.
References assert, intl_identifier_lower(), and intl_identifier_lower_string_size().
Referenced by add_resolution(), create_select_to_insert_into(), def_class_internal(), do_create_auto_increment_serial(), do_update_auto_increment_serial_on_rename(), do_update_maxvalue_of_auto_increment_serial(), get_attribute_with_name(), get_class_mops(), get_requested_classes(), jsp_check_stored_procedure_name(), la_create_repl_filter(), ldr_find_class(), pt_add_lock_class(), query_get_column_with_name(), sm_find_class(), sm_find_class_with_purpose(), sm_rename_class(), smt_add_attribute_any(), smt_add_method_any(), smt_change_attribute(), smt_rename_any(), smt_set_attribute_default(), tr_create_trigger(), tr_get_class_name(), tr_process_name(), update_locksets_for_multiple_rename(), and util_get_class_oids_and_index_btid().
|
static |
Definition at line 12958 of file schema_manager.c.
References assert, classobj_find_cons_primary_key(), sm_class::constraints, DB_CONSTRAINT_FOREIGN_KEY, dbt_abort_class(), dbt_drop_constraint(), dbt_edit_class(), dbt_finish_class(), er_errid(), error(), sm_class_constraint::fk_info, sm_foreign_key_info::name, NO_ERROR, NULL, sm_foreign_key_info::self_oid, and ws_mop().
Referenced by sm_delete_class_mop().
int sm_drop_constraint | ( | MOP | classop, |
DB_CONSTRAINT_TYPE | constraint_type, | ||
const char * | constraint_name, | ||
const char ** | att_names, | ||
bool | class_attributes, | ||
bool | mysql_index_name | ||
) |
Definition at line 14904 of file schema_manager.c.
References assert, AU_ALTER, au_fetch_class(), AU_FETCH_READ, AU_SELECT, classobj_find_class_index(), DB_CONSTRAINT_INDEX, DB_CONSTRAINT_NOT_NULL, DB_CONSTRAINT_PRIMARY_KEY, DB_CONSTRAINT_REVERSE_INDEX, DB_CONSTRAINT_REVERSE_UNIQUE, db_constraint_type(), DB_CONSTRAINT_UNIQUE, er_errid(), error(), NO_ERROR, NULL, SM_ATTFLAG_NON_NULL, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_REVERSE_INDEX, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, sm_drop_index(), SM_MAP_CONSTRAINT_TO_ATTFLAG, sm_update_class(), smt_drop_constraint(), smt_edit_class_mop(), smt_quit(), and sm_class_constraint::type.
Referenced by create_or_drop_index_helper(), db_drop_constraint(), do_alter_clause_change_attribute(), do_alter_index_rebuild(), do_drop_att_constraints(), do_drop_saved_indexes(), do_recreate_renamed_class_indexes(), and sm_truncate_class().
Definition at line 13868 of file schema_manager.c.
References assert, au_fetch_class(), AU_FETCH_UPDATE, AU_INDEX, BTID_SET_NULL, classobj_cache_class_constraints(), classobj_cache_constraints(), classobj_find_class_constraint(), classobj_free_class_constraints(), classobj_populate_class_properties(), classobj_remove_class_constraint_node(), sm_class::constraints, deallocate_index(), er_errid(), ER_LK_UNILATERALLY_ABORTED, ER_SM_NO_INDEX, error(), ERROR1, free_and_init, i, sm_class_constraint::index_btid, locator_flush_class(), locator_update_class(), NO_ERROR, NULL, sm_class::properties, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_REVERSE_INDEX, sm_drop_index(), sm_exist_index(), sm_partitioned_class_type(), sm_update_statistics(), STATS_WITH_SAMPLING, tran_abort_upto_system_savepoint(), tran_system_savepoint(), tran_unilaterally_abort(), and UNIQUE_PARTITION_SAVEPOINT_INDEX.
Referenced by do_drop_att_constraints(), do_drop_saved_indexes(), do_recreate_renamed_class_indexes(), sm_drop_constraint(), sm_drop_index(), and sm_truncate_class().
int sm_drop_trigger | ( | DB_OBJECT * | classop, |
const char * | attribute, | ||
int | class_attribute, | ||
DB_OBJECT * | trigger | ||
) |
Definition at line 4526 of file schema_manager.c.
References alter_trigger_hierarchy(), AU_ALTER, au_fetch_class(), AU_FETCH_UPDATE, ER_HEAP_UNKNOWN_OBJECT, error(), NO_ERROR, and NULL.
Referenced by tr_drop_trigger_internal().
|
static |
Definition at line 1531 of file schema_manager.c.
References assert, db_ws_alloc(), db_ws_free(), er_errid(), error(), i, sm_class::loader_commands, sm_class::method_files, sm_class::methods_loaded, NO_ERROR, NULL, sm_expand_method_files(), sm_file_extension(), sm_free_loader_commands(), sm_split_loader_commands(), and ws_list_length().
Referenced by sm_link_method(), and sm_link_methods().
Definition at line 13382 of file schema_manager.c.
References allocate_index(), ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, au_fetch_class(), au_fetch_class_by_classmop(), AU_FETCH_EXCLUSIVE_SCAN, AU_FETCH_READ, AU_INDEX, AU_SELECT, BTID_COPY, BTID_IS_NULL, BTID_SET_NULL, classobj_cache_class_constraints(), classobj_cache_constraints(), classobj_decache_class_constraints(), classobj_find_attribute(), classobj_find_class_index(), classobj_find_constraint_by_name(), classobj_put_index(), sm_class::constraints, DB_CONSTRAINT_INDEX, DB_CONSTRAINT_REVERSE_INDEX, db_constraint_type(), DECACHE, db_object::decached, do_recreate_filter_index_constr(), do_recreate_func_index_constr(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_LK_UNILATERALLY_ABORTED, ER_OUT_OF_VIRTUAL_MEMORY, ER_REGU_NOT_IMPLEMENTED, er_set(), ER_SM_ATTRIBUTE_NOT_FOUND, ER_SM_INDEX_EXISTS, ER_SM_INDEX_ON_SHARED, ER_SM_INDEX_PREFIX_LENGTH_ON_PARTITIONED_CLASS, error(), ERROR1, free_and_init, i, ID_ATTRIBUTE, ID_SHARED_ATTRIBUTE, sm_class_constraint::index_btid, locator_flush_all_instances(), locator_flush_class(), locator_update_class(), NO_ERROR, NULL, sm_predicate_info::num_attrs, sm_class::properties, rel_major_release_string(), sm_check_index_exist(), sm_exist_index(), sm_free_filter_index_info(), sm_free_function_index_info(), sm_get_ch_name(), SM_IS_CONSTRAINT_REVERSE_INDEX_FAMILY, SM_MAP_DB_INDEX_CONSTRAINT_TO_SM_CONSTRAINT, sm_partitioned_class_type(), sm_save_filter_index_info(), sm_save_function_index_info(), sm_update_statistics(), STATS_WITH_SAMPLING, TEXT_CONSTRAINT_PREFIX, tran_abort_upto_system_savepoint(), tran_system_savepoint(), tran_unilaterally_abort(), and UNIQUE_PARTITION_SAVEPOINT_INDEX.
Referenced by sm_add_secondary_index_on_partition(), sm_drop_index(), sm_exist_index(), smt_rename_any(), and transfer_disk_structures().
|
static |
Definition at line 977 of file schema_manager.c.
References ARG_FILE_LINE, assert, envvar_expand(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SM_INVALID_METHOD_ENV, error(), sm_method_file::expanded_name, intl_mbs_chr(), sm_method_file::name, sm_method_file::next, NO_ERROR, NULL, WC_PERIOD, ws_copy_string(), and ws_free_string().
Referenced by sm_dynamic_link_class(), sm_locate_method_file(), and sm_prelink_methods().
DB_OBJLIST* sm_fetch_all_base_classes | ( | int | external_list, |
DB_FETCH_MODE | purpose | ||
) |
Definition at line 2339 of file schema_manager.c.
References au_check_user(), au_fetch_class_force(), AU_FETCH_READ, DB_FETCH_QUERY_READ, error(), i, sm_class::inheritance, locator_free_list_mops(), locator_get_all_mops(), ml_append(), ml_ext_alloc_link(), ml_ext_free(), ml_free(), list_mops::mops, db_objlist::next, NO_ERROR, NULL, list_mops::num, db_objlist::op, sm_fetch_all_base_classes(), sm_fetch_all_classes(), and WS_IS_DELETED.
Referenced by db_fetch_base_classes(), db_get_base_classes(), and sm_fetch_all_base_classes().
DB_OBJLIST* sm_fetch_all_classes | ( | int | external_list, |
DB_FETCH_MODE | purpose | ||
) |
Definition at line 2256 of file schema_manager.c.
References au_check_user(), i, locator_free_list_mops(), locator_get_all_mops(), ml_append(), ml_ext_alloc_link(), ml_ext_free(), ml_free(), list_mops::mops, db_objlist::next, NO_ERROR, NULL, list_mops::num, db_objlist::op, and WS_IS_DELETED.
Referenced by db_fetch_all_classes(), db_get_all_classes(), get_ordered_classes(), and sm_fetch_all_base_classes().
DB_OBJLIST* sm_fetch_all_objects | ( | DB_OBJECT * | op, |
DB_FETCH_MODE | purpose | ||
) |
Definition at line 2469 of file schema_manager.c.
References NULL, and sm_fetch_all_objects_internal().
Referenced by au_force_write_new_auth(), db_fetch_all_objects(), db_get_all_objects(), sm_fetch_all_objects_internal(), and tr_get_class_name().
|
static |
Definition at line 2508 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, DB_FETCH_QUERY_READ, i, if(), is_class(), locator_free_list_mops(), locator_get_all_mops(), locator_is_class(), ml_ext_alloc_link(), ml_ext_free(), list_mops::mops, db_objlist::next, NULL, list_mops::num, db_object::object, db_objlist::op, SM_CLASS_CT, sm_fetch_all_objects(), sm_get_class_type(), vid_getall_mops(), ws_class_mop(), and WS_IS_DELETED.
Referenced by sm_fetch_all_objects(), and sm_fetch_all_objects_of_dirty_version().
DB_OBJLIST* sm_fetch_all_objects_of_dirty_version | ( | DB_OBJECT * | op, |
DB_FETCH_MODE | purpose | ||
) |
Definition at line 2484 of file schema_manager.c.
References LC_FETCH_DIRTY_VERSION, and sm_fetch_all_objects_internal().
Definition at line 1510 of file schema_manager.c.
References strlen.
Referenced by sm_dynamic_link_class().
int sm_filter_domain | ( | TP_DOMAIN * | domain, |
int * | changes | ||
) |
Definition at line 3377 of file schema_manager.c.
References error(), NO_ERROR, NULL, and tp_domain_filter_list().
Referenced by db_attdesc_domain(), db_attribute_domain(), db_get_attribute_domain(), db_method_arg_domain(), db_method_return_domain(), object_printer::describe_domain(), find_attribute_op(), sm_att_class(), sm_att_info(), sm_check_class_domain(), and sm_clean_class().
|
static |
Definition at line 11308 of file schema_manager.c.
References assert, sm_predicate_info::att_ids, sm_class_constraint::filter_predicate, find_matching_att(), sm_attribute::header, i, sm_attribute::id, sm_component::next, NULL, and sm_predicate_info::num_attrs.
Referenced by transfer_disk_structures().
void sm_final | ( | void | ) |
Definition at line 2081 of file schema_manager.c.
References sm_descriptor::next, NULL, sm_free_descriptor(), and sm_free_resident_classes_virtual_query_cache().
Referenced by boot_client_all_finalize(), boot_initialize_client(), and boot_restart_client().
Definition at line 5040 of file schema_manager.c.
References locator_find_class(), sm_downcase_name(), and SM_MAX_IDENTIFIER_LENGTH.
Referenced by au_change_owner_method(), au_change_serial_owner_method(), au_check_authorization_method(), au_force_write_new_auth(), au_get_owner_method(), au_make_user(), au_set_new_auth(), au_set_password_internal(), au_start(), boot_client_find_and_cache_class_oids(), build_query_graph_function_index(), db_find_class(), db_get_schema_def_dbval(), db_get_serial_current_value(), db_get_serial_next_value_ex(), db_preload_classes(), disk_to_class(), do_add_attribute_from_select_column(), do_alter_serial(), do_change_att_schema_only(), do_coalesce_partition_post(), do_coalesce_partition_pre(), do_create_auto_increment_serial(), do_create_serial(), do_create_serial_internal(), do_drop_partition_list(), do_drop_serial(), do_find_auto_increment_serial(), do_promote_partition(), do_promote_partition_by_name(), do_promote_partition_list(), do_redistribute_partitions_data(), do_remove_partition_post(), do_reorganize_partition_post(), do_update_maxvalue_of_auto_increment_serial(), graph_size_for_entity(), class_description::init(), obj_create_by_name(), populate_auto_increment(), pt_check_access_status(), pt_check_show_index(), pt_check_table_in_show_heap(), pt_help_show_create_table(), pt_resolve_serial(), pt_to_aggregate_node(), sm_delete_class_mop(), smt_check_foreign_key(), smt_copy_class(), smt_edit_class_mop(), stats_dump(), tr_get_class_name(), and tr_is_trigger().
Definition at line 5059 of file schema_manager.c.
References locator_find_class_with_purpose(), sm_downcase_name(), and SM_MAX_IDENTIFIER_LENGTH.
Referenced by db_find_class_with_purpose().
BTID* sm_find_index | ( | MOP | classop, |
char ** | att_names, | ||
int | num_atts, | ||
bool | unique_index_only, | ||
bool | skip_prefix_index, | ||
BTID * | btid | ||
) |
Definition at line 5326 of file schema_manager.c.
References sm_class_constraint::attributes, sm_class_constraint::attrs_prefix_length, au_fetch_class(), AU_FETCH_READ, AU_SELECT, BTID_COPY, classobj_find_attribute(), sm_class::constraints, error(), i, sm_attribute::id, sm_class_constraint::index_btid, sm_class::inheritance, is_global, sm_class_constraint::next, NO_ERROR, NULL, sm_class::partition, SM_IS_CONSTRAINT_INDEX_FAMILY, SM_IS_CONSTRAINT_UNIQUE_FAMILY, sm_is_global_only_constraint(), sm_class_constraint::type, and sm_class::users.
Referenced by pt_to_aggregate_node().
|
static |
Definition at line 651 of file schema_manager.c.
References static_method::name, static_method::next, NULL, and Static_method_table.
Referenced by sm_link_static_method().
Definition at line 16184 of file schema_manager.c.
References assert, au_fetch_class_by_classmop(), AU_FETCH_READ, AU_SELECT, error(), db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_find_subclass_in_hierarchy(), sm_class::users, and ws_mop_compare().
Referenced by sm_find_subclass_in_hierarchy(), and tr_validate_schema_cache().
int sm_finish_class | ( | SM_TEMPLATE * | template_, |
MOP * | classmop | ||
) |
Definition at line 12866 of file schema_manager.c.
References AU_ALTER, and update_class().
Referenced by dbt_finish_class().
int sm_flush_and_decache_objects | ( | MOP | obj, |
int | decache | ||
) |
Definition at line 6093 of file schema_manager.c.
References au_fetch_instance(), AU_FETCH_READ, AU_SELECT, DB_FETCH_READ, ER_WS_NO_CLASS_FOR_INSTANCE, error(), ERROR0, is_class(), locator_is_class(), NO_ERROR, NULL, sm_flush_and_decache_objects_internal(), TM_TRAN_READ_FETCH_VERSION, and ws_class_mop().
Referenced by build_xasl_for_server_delete(), do_execute_delete(), do_execute_merge(), do_execute_update(), do_insert_at_server(), sm_flush_objects(), sm_truncate_class(), and update_at_server().
Definition at line 6030 of file schema_manager.c.
References ASSERT_ERROR_AND_SET, sm_class::class_type, DB_FETCH_READ, DONT_DECACHE, ER_WS_NO_CLASS_FOR_INSTANCE, error(), ERROR0, sm_class::flags, locator_fetch_class(), locator_flush_all_instances(), locator_flush_class(), NO_ERROR, NULL, SM_ADT_CT, SM_CLASS_CT, SM_CLASSFLAG_SYSTEM, SM_VCLASS_CT, and vid_flush_all_instances().
Referenced by sm_flush_and_decache_objects().
int sm_flush_for_multi_update | ( | MOP | class_mop | ) |
Definition at line 6150 of file schema_manager.c.
References assert, er_errid(), error(), locator_flush_for_multi_update(), NO_ERROR, sm_class_check_uniques(), success(), vid_flush_all_instances(), and WS_ISVID.
Referenced by update_objs_for_list_file().
int sm_flush_objects | ( | MOP | obj | ) |
Definition at line 5946 of file schema_manager.c.
References sm_flush_and_decache_objects().
Referenced by do_execute_delete(), do_execute_merge(), do_execute_update(), do_merge(), find_unique(), flush_temporary_OID(), la_repl_add_object(), obj_find_multi_attr(), obj_find_multi_desc(), obj_find_object_by_pkey(), pt_flush_classes(), and sm_rename_class().
void sm_flush_static_methods | ( | void | ) |
Definition at line 629 of file schema_manager.c.
References free_and_init, static_method::name, static_method::next, sm_candidate::next, and NULL.
Referenced by boot_client_all_finalize(), and db_flush_static_methods().
int sm_force_method_link | ( | MOP | obj | ) |
Definition at line 1716 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, error(), sm_class::methods_loaded, NO_ERROR, NULL, and sm_link_methods().
Referenced by db_force_method_reload().
int sm_force_write_all_classes | ( | void | ) |
Definition at line 3295 of file schema_manager.c.
References assert, DB_FETCH_QUERY_WRITE, DONT_DECACHE, er_errid(), i, locator_flush_all_instances(), locator_free_list_mops(), locator_get_all_mops(), list_mops::mops, NO_ERROR, NULL, list_mops::num, and ws_dirty().
Referenced by catcls_vclass_install(), and createdb().
void sm_free_constraint_info | ( | SM_CONSTRAINT_INFO ** | save_info | ) |
Definition at line 15044 of file schema_manager.c.
References sm_constraint_info::asc_desc, sm_constraint_info::att_names, sm_constraint_info::comment, sm_constraint_info::filter_predicate, free_and_init, sm_constraint_info::func_index_info, sm_constraint_info::name, sm_constraint_info::next, NULL, sm_constraint_info::prefix_length, sm_constraint_info::ref_attrs, sm_constraint_info::ref_cls_name, sm_free_filter_index_info(), and sm_free_function_index_info().
Referenced by do_alter_clause_change_attribute(), do_copy_indexes(), do_recreate_renamed_class_indexes(), do_redistribute_partitions_data(), save_constraint_info_from_pt_node(), sm_save_constraint_info(), and sm_truncate_class().
void sm_free_descriptor | ( | SM_DESCRIPTOR * | desc | ) |
Definition at line 6630 of file schema_manager.c.
References classobj_free_descriptor(), sm_descriptor::next, and NULL.
Referenced by db_free_attribute_descriptor(), db_free_method_descriptor(), and sm_final().
void sm_free_filter_index_info | ( | SM_PREDICATE_INFO * | filter_index_info | ) |
Definition at line 16070 of file schema_manager.c.
References assert, sm_predicate_info::att_ids, free_and_init, NULL, sm_predicate_info::pred_stream, and sm_predicate_info::pred_string.
Referenced by sm_add_secondary_index_on_partition(), sm_exist_index(), sm_free_constraint_info(), and sm_save_filter_index_info().
void sm_free_function_index_info | ( | SM_FUNCTION_INFO * | func_index_info | ) |
Definition at line 16045 of file schema_manager.c.
References assert, sm_function_info::expr_str, sm_function_info::expr_stream, sm_function_info::fi_domain, free_and_init, NULL, and tp_domain_free().
Referenced by create_or_drop_index_helper(), do_alter_index_rebuild(), do_create_partition_constraint(), do_recreate_func_index_constr(), pt_node_to_function_index(), pt_node_to_partition_info(), sm_add_secondary_index_on_partition(), sm_exist_index(), sm_free_constraint_info(), and sm_save_function_index_info().
|
static |
Definition at line 1147 of file schema_manager.c.
References ARG_FILE_LINE, assert, db_ws_free(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SM_UNRESOLVED_METHOD, ER_SM_UNRESOLVED_METHODS, error(), free_and_init, sm_method_signature::function, sm_method::function, sm_method_signature::function_name, handle, sm_method::header, i, method_link::method, N_TEXT, schema_def::name, sm_component::name, method_link::namelist_index, method_link::next, nlist(), NO_ERROR, NULL, sm_method::signatures, sm_build_function_nlist(), SM_MAX_IDENTIFIER_LENGTH, and strlen.
|
static |
Definition at line 809 of file schema_manager.c.
References db_ws_free(), i, and NULL.
Referenced by sm_dynamic_link_class().
|
static |
Definition at line 832 of file schema_manager.c.
References db_ws_free(), method_link::next, sm_candidate::next, and NULL.
Referenced by sm_link_method(), sm_link_methods(), and sm_prelink_methods().
|
static |
Definition at line 2058 of file schema_manager.c.
References if(), mq_free_virtual_query_cache(), db_objlist::next, NULL, db_object::object, db_objlist::op, sm_class::virtual_query_cache, and ws_Resident_classes.
Referenced by sm_final(), and sm_transaction_boundary().
Definition at line 5147 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, classobj_find_attribute_id(), error(), sm_attribute::header, schema_def::name, sm_component::name, NO_ERROR, and NULL.
Referenced by stats_dump().
int sm_get_attribute_descriptor | ( | DB_OBJECT * | op, |
const char * | name, | ||
int | class_attribute, | ||
int | for_update, | ||
SM_DESCRIPTOR ** | desc_ptr | ||
) |
Definition at line 6473 of file schema_manager.c.
References assert, AU_ALTER, au_fetch_class(), AU_FETCH_READ, AU_FETCH_UPDATE, AU_SELECT, classobj_find_attribute(), classobj_make_descriptor(), DB_FETCH_CLREAD_INSTREAD, DB_FETCH_CLREAD_INSTWRITE, er_errid(), ER_OBJ_INVALID_ATTRIBUTE, error(), ERROR1, sm_attribute::header, ID_SHARED_ATTRIBUTE, is_class(), locator_is_class(), sm_component::name_space, sm_descriptor::next, NO_ERROR, NULL, sm_Descriptors, and ws_class_mop().
Referenced by db_get_attribute_descriptor().
Definition at line 4891 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, DB_FETCH_READ, locator_is_class(), NO_ERROR, NULL, sm_ch_heap(), and sm_ch_rep_dir().
Referenced by db_class_has_instance(), db_get_class_num_objs_and_pages(), do_alter_one_clause_with_template(), do_check_for_empty_classes_in_delete(), grok_classes(), pt_link_regu_to_selupd_list(), pt_make_class_access_spec(), pt_to_delete_xasl(), pt_to_merge_update_xasl(), and pt_to_update_xasl().
Definition at line 4565 of file schema_manager.c.
References AU_DISABLE, AU_ENABLE, au_fetch_class(), au_fetch_class_force(), AU_FETCH_READ, AU_SELECT, sm_class::header, schema_def::name, NO_ERROR, NULL, and sm_ch_name().
Referenced by api_rmeta_get_info(), au_print_grant_entry(), au_set_new_auth(), candidate_source_name(), check_invalid_resolutions(), check_target(), create_or_drop_index_helper(), db_get_class_name(), db_get_subclass_names(), db_get_superclass_names(), object_printer::describe_attribute(), object_printer::describe_domain(), object_printer::describe_method(), object_printer::describe_method_file(), object_printer::describe_resolution(), do_copy_indexes(), find_any(), find_method(), grok_classes(), trigger_description::init(), class_description::init(), issue_grant_statement(), ldr_update_statistics(), lock_subclasses_internal(), populate_auto_increment(), sch_trigger(), sm_add_secondary_index_on_partition(), sm_delete_class_mop(), sm_exist_index(), sm_produce_constraint_name_mop(), smt_add_method_any(), smt_drop_constraint(), smt_edit_class_mop(), smt_find_attribute(), smt_rename_any(), template_classname(), update_fk_ref_partitioned_class(), and ws_print_oid().
Definition at line 2210 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, DB_FETCH_READ, is_class(), locator_is_class(), NO_ERROR, NULL, and ws_class_mop().
Referenced by au_find_user_cache_index(), db_get_class(), db_object_fetch(), obt_edit_object(), and tr_is_trigger().
int sm_get_class_collation | ( | MOP | classop, |
int * | collation_id | ||
) |
Definition at line 2961 of file schema_manager.c.
References assert, au_fetch_class_force(), AU_FETCH_READ, sm_class::collation_id, error(), NO_ERROR, and NULL.
Referenced by pt_check_alter().
int sm_get_class_flag | ( | MOP | op, |
SM_CLASS_FLAG | flag | ||
) |
Definition at line 3265 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_READ, DB_FETCH_READ, sm_class::flags, locator_is_class(), NO_ERROR, and NULL.
Referenced by emit_schema(), mq_translate_subqueries(), sm_is_system_class(), and test_check_option().
int sm_get_class_repid | ( | MOP | classop | ) |
Definition at line 5766 of file schema_manager.c.
References assert, au_fetch_class(), AU_FETCH_READ, AU_SELECT, AU_UPDATE, DB_FETCH_QUERY_READ, DB_FETCH_QUERY_WRITE, DB_FETCH_READ, db_ws_alloc(), er_errid(), error(), locator_fetch_class(), locator_is_class(), ml_add(), ml_find(), ml_free(), db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_class::repid, and sm_class::users.
Referenced by chksum_start().
int sm_get_class_tde_algorithm | ( | MOP | classop, |
TDE_ALGORITHM * | tde_algo | ||
) |
Definition at line 2914 of file schema_manager.c.
References assert, au_fetch_class_force(), AU_FETCH_READ, error(), NO_ERROR, NULL, sm_class::tde_algorithm, and TDE_ALGORITHM_NONE.
Referenced by object_printer::describe_class().
Definition at line 3781 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, DB_FETCH_QUERY_READ, err, is_class(), locator_flush_class(), locator_is_class(), NO_ERROR, NULL, OID_ISTEMP, sm_class::stats, stats_free_statistics(), stats_get_statistics(), class_stats::time_stamp, and WS_OID.
Referenced by do_create_partition_constraints(), grok_classes(), and stats_dump().
int sm_get_descriptor_component | ( | MOP | op, |
SM_DESCRIPTOR * | desc, | ||
int | for_update, | ||
SM_CLASS ** | class_ptr, | ||
SM_COMPONENT ** | comp_ptr | ||
) |
Definition at line 6758 of file schema_manager.c.
References assert, sm_descriptor_list::class_, sm_descriptor_list::classobj, classobj_find_component(), classobj_make_desclist(), sm_descriptor_list::comp, db_attribute_domain(), db_attribute_next(), db_attribute_type(), db_domain_class(), db_get_class_name(), db_get_superclasses(), DB_TYPE_OBJECT, er_errid(), ER_OBJ_INVALID_ATTRIBUTE, ER_OBJ_INVALID_METHOD, error(), ERROR1, fetch_descriptor_class(), ID_CLASS_ATTRIBUTE, ID_CLASS_METHOD, ID_METHOD, intl_identifier_casecmp(), IS_CLASS_MOP, sm_descriptor::map, sm_descriptor::name, sm_descriptor::name_space, sm_descriptor_list::next, NO_ERROR, NULL, db_objlist::op, sm_descriptor_list::write_access, and ws_class_mop().
Referenced by construct_instance(), ldr_act_add_attr(), ldr_refresh_attrs(), obj_desc_find_unique(), obj_desc_get(), obj_desc_send_array(), obj_desc_send_array_quick(), obj_desc_send_list(), obj_desc_send_va(), obj_desc_set(), obj_find_multi_desc(), and obt_desc_set().
Definition at line 14011 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, classobj_find_attribute(), sm_attribute::constraints, ER_SM_ATTRIBUTE_NOT_FOUND, error(), ERROR1, sm_attribute::header, ID_ATTRIBUTE, sm_constraint::index, sm_component::name_space, sm_constraint::next, NO_ERROR, NULL, SM_IS_CONSTRAINT_INDEX_FAMILY, and sm_constraint::type.
Referenced by db_is_indexed().
int sm_get_method_descriptor | ( | DB_OBJECT * | op, |
const char * | name, | ||
int | class_method, | ||
SM_DESCRIPTOR ** | desc_ptr | ||
) |
Definition at line 6575 of file schema_manager.c.
References assert, AU_EXECUTE, au_fetch_class(), AU_FETCH_READ, classobj_find_method(), classobj_make_descriptor(), DB_FETCH_READ, er_errid(), ER_OBJ_INVALID_METHOD, error(), ERROR1, is_class(), locator_is_class(), sm_descriptor::next, NO_ERROR, NULL, sm_Descriptors, and ws_class_mop().
Referenced by db_get_method_descriptor().
Definition at line 1952 of file schema_manager.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, classobj_find_method(), ER_ERROR_SEVERITY, ER_PC_UNIMPLEMENTED, er_set(), sm_method_signature::function_name, NO_ERROR, NULL, sm_method::signatures, sm_locate_method_file(), strlen, and ws_copy_string().
Referenced by db_get_method_source_file().
CLASS_STATS* sm_get_statistics_force | ( | MOP | classop | ) |
Definition at line 3854 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, DB_FETCH_QUERY_READ, err, is_class(), locator_is_class(), NO_ERROR, NULL, OID_ISTEMP, sm_class::stats, stats_free_statistics(), stats_get_statistics(), and WS_OID.
Referenced by make_cst_item_value().
int sm_get_trigger_cache | ( | DB_OBJECT * | classop, |
const char * | attribute, | ||
int | class_attribute, | ||
void ** | cache | ||
) |
Definition at line 4091 of file schema_manager.c.
References ARG_FILE_LINE, AU_ALTER, au_fetch_class(), AU_FETCH_READ, AU_FETCH_UPDATE, AU_SELECT, classobj_find_attribute(), er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, er_set(), error(), NO_ERROR, NULL, db_identifier::pageid, db_identifier::slotid, sm_attribute::triggers, sm_class::triggers, sm_class::triggers_validated, db_identifier::volid, WS_IS_DELETED, and WS_OID.
Referenced by get_schema_trigger_objects(), and tr_prepare_statement().
unsigned int sm_global_schema_version | ( | void | ) |
Definition at line 6221 of file schema_manager.c.
References global_schema_version.
Referenced by sm_virtual_queries().
Definition at line 4958 of file schema_manager.c.
References sm_class::attributes, sm_class::constraints, sm_attribute::flags, sm_attribute::header, sm_component::next, sm_class_constraint::next, NULL, SM_IS_CONSTRAINT_INDEX_FAMILY, and sm_class_constraint::type.
Referenced by locator_mflush().
int sm_has_non_null_attribute | ( | SM_ATTRIBUTE ** | attrs | ) |
Definition at line 15911 of file schema_manager.c.
References assert, i, NULL, and SM_ATTFLAG_NON_NULL.
Definition at line 2009 of file schema_manager.c.
References sm_class_header::ch_heap, sm_class_header::ch_rep_dir, COPY_OID, vfid::fileid, sm_class::header, hfid::hpgid, NULL, oid_Root_class_oid, OID_SET_NULL, hfid::vfid, vfid::volid, ws_mop(), and ws_oid().
Referenced by boot_restart_client().
int sm_invalidate_trigger_cache | ( | DB_OBJECT * | classop | ) |
Definition at line 4308 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, error(), NO_ERROR, and sm_class::triggers_validated.
Referenced by tr_set_status().
int sm_is_global_only_constraint | ( | MOP | classmop, |
SM_CLASS_CONSTRAINT * | constraint, | ||
int * | is_global, | ||
SM_TEMPLATE * | template_ | ||
) |
Definition at line 16104 of file schema_manager.c.
References assert, assert_release, sm_class_constraint::attributes, sm_attribute::flags, i, sm_template::inheritance, NO_ERROR, NULL, sm_template::partition, sm_template::partition_parent_atts, SM_ATTFLAG_PARTITION_KEY, SM_CONSTRAINT_FOREIGN_KEY, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_NOT_NULL, SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_REVERSE_INDEX, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, and sm_class_constraint::type.
Referenced by allocate_unique_constraint(), classobj_copy_props(), filter_local_constraints(), flatten_properties(), is_index_owner(), sm_find_index(), smt_rename_any(), and transfer_disk_structures().
bool sm_is_index_visible | ( | SM_CLASS_CONSTRAINT * | constraint_list, |
BTID | btid | ||
) |
Definition at line 16656 of file schema_manager.c.
References assert, BTID_IS_EQUAL, sm_class_constraint::index_btid, sm_class_constraint::index_status, sm_class_constraint::next, NO_ERROR, NULL, and SM_NORMAL_INDEX.
Referenced by qo_get_attr_info().
|
static |
Definition at line 6294 of file schema_manager.c.
References assert_release, au_fetch_class_force(), AU_FETCH_READ, nested_view_version_info::class_object, view_cache_info::nested_views, nested_view_version_info::next, NO_ERROR, NULL, parser_context::view_cache, sm_class::virtual_cache_global_schema_id, nested_view_version_info::virtual_cache_global_schema_id, sm_class::virtual_cache_local_schema_id, nested_view_version_info::virtual_cache_local_schema_id, sm_class::virtual_cache_snapshot_version, nested_view_version_info::virtual_cache_snapshot_version, and sm_class::virtual_query_cache.
Referenced by sm_virtual_queries().
Definition at line 4688 of file schema_manager.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, error(), sm_class::inheritance, NO_ERROR, NULL, db_objlist::op, sm_class::partition, and sm_class::users.
Referenced by db_is_partition().
int sm_is_partitioned_class | ( | MOP | op | ) |
Definition at line 3074 of file schema_manager.c.
References AU_DISABLE, AU_ENABLE, au_fetch_class_force(), AU_FETCH_READ, DB_FETCH_READ, locator_is_class(), locator_is_root(), NO_ERROR, NULL, and sm_class::partition.
Referenced by do_alter_one_clause_with_template(), do_create_entity(), is_replace_or_odku_allowed(), pt_to_delete_xasl(), pt_to_update_xasl(), qo_can_generate_single_table_connect_by(), and transfer_disk_structures().
|
static |
Definition at line 15010 of file schema_manager.c.
References assert, sm_class::inheritance, NULL, sm_constraint_belongs_to_class(), SM_CONSTRAINT_INDEX, SM_CONSTRAINT_NOT_NULL, SM_CONSTRAINT_REVERSE_INDEX, sm_class_constraint::type, and sm_class::users.
Referenced by sm_truncate_class().
Definition at line 3026 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_READ, sm_class::flags, NO_ERROR, NULL, and SM_CLASSFLAG_REUSE_OID.
Referenced by dbt_set_label(), object_printer::describe_class(), locator_add_instance(), locator_cache_have_object(), locator_cache_object_instance(), locator_lock(), locator_lock_and_doesexist(), locator_lock_nested(), locator_lock_set(), mq_updatable_local(), obt_assign_obt(), pt_check_alter(), pt_check_attribute_domain(), pt_check_sub_insert(), pt_semantic_check_local(), pt_to_func_pred(), pt_to_insert_xasl(), pt_to_merge_insert_xasl(), pt_to_pred_with_context(), sm_truncate_using_delete(), and ws_identifier_with_check().
Definition at line 4641 of file schema_manager.c.
References assert, ASSERT_ERROR, au_fetch_class(), AU_FETCH_READ, AU_SELECT, er_errid(), sm_class::inheritance, db_objlist::next, NO_ERROR, NULL, db_objlist::op, and sm_is_subclass().
Referenced by db_is_subclass(), and sm_is_subclass().
int sm_is_system_class | ( | MOP | op | ) |
Definition at line 3014 of file schema_manager.c.
References SM_CLASSFLAG_SYSTEM, and sm_get_class_flag().
Referenced by db_is_system_class(), extract_objects(), mq_updatable_local(), tr_dump_selective_triggers(), and tr_status_as_string().
int sm_issystem | ( | SM_CLASS * | class_ | ) |
Definition at line 6188 of file schema_manager.c.
References sm_class::flags, and SM_CLASSFLAG_SYSTEM.
Referenced by au_change_owner_method(), and is_protected_class().
Definition at line 1680 of file schema_manager.c.
References error(), sm_method::function, sm_class::methods_loaded, NO_ERROR, NULL, sm_dynamic_link_class(), sm_free_method_links(), and sm_link_static_methods().
Referenced by obj_desc_send_array_quick(), obj_send_method_array(), obj_send_method_list(), and obj_send_method_va().
|
static |
Definition at line 1638 of file schema_manager.c.
References error(), sm_class::methods_loaded, NO_ERROR, NULL, sm_dynamic_link_class(), sm_free_method_links(), and sm_link_static_methods().
Referenced by sm_force_method_link().
|
static |
Definition at line 856 of file schema_manager.c.
References assert, db_ws_alloc(), er_errid(), error(), static_method::function, sm_method_signature::function, sm_method::function, sm_method_signature::function_name, method_link::method, method_link::namelist_index, method_link::next, NO_ERROR, NULL, sm_method::signatures, and sm_find_static_method().
Referenced by sm_link_static_methods().
|
static |
Definition at line 913 of file schema_manager.c.
References sm_class::class_methods, error(), sm_method::header, sm_class::methods, method_link::next, sm_component::next, NO_ERROR, NULL, and sm_link_static_method().
Referenced by sm_link_method(), sm_link_methods(), and sm_prelink_methods().
Definition at line 16424 of file schema_manager.c.
References ARG_FILE_LINE, sm_class_constraint::asc_desc, assert, ASSERT_ERROR, sm_function_info::attr_index_start, sm_class_constraint::attributes, sm_class_constraint::attrs_prefix_length, AU_ALTER, au_fetch_class(), AU_FETCH_UPDATE, BTREE_CONSTRAINT_PRIMARY_KEY, BTREE_CONSTRAINT_UNIQUE, btree_load_index(), classobj_find_constraint_by_name(), sm_function_info::col_id, sm_class::constraints, construct_index_key_domain(), COPY_OID, sm_attribute::domain, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SM_INVALID_INDEX_TYPE, ER_SM_INVALID_INDEX_WITH_PREFIX_TYPE, ER_SM_INVALID_PREFIX_LENGTH, ER_WARNING_SEVERITY, error(), sm_function_info::expr_stream, sm_function_info::expr_stream_size, sm_function_info::fi_domain, sm_class_constraint::filter_predicate, free_and_init, sm_class_constraint::func_index_info, HFID_COPY, i, pr_type::id, sm_attribute::id, sm_class_constraint::index_btid, sm_class_constraint::index_status, db_objlist::next, NO_ERROR, NULL, db_objlist::op, pr_type_name(), tp_domain::precision, sm_class_constraint::shared_cons_name, sm_ch_heap(), SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_REVERSE_INDEX, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, SM_GET_FILTER_PRED_STREAM, SM_GET_FILTER_PRED_STREAM_SIZE, SM_ONLINE_INDEX_BUILDING_IN_PROGRESS, TP_IS_BIT_TYPE, TP_IS_CHAR_TYPE, tp_valid_indextype(), sm_attribute::type, sm_class_constraint::type, sm_class::users, and WS_OID.
Referenced by sm_add_constraint().
unsigned int sm_local_schema_version | ( | void | ) |
Definition at line 6199 of file schema_manager.c.
References local_schema_version.
Referenced by make_template(), sm_virtual_queries(), and validate_template().
Definition at line 1877 of file schema_manager.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_PC_UNIMPLEMENTED, er_set(), nlist(), NO_ERROR, NULL, sm_expand_method_files(), and SM_MAX_IDENTIFIER_LENGTH.
Referenced by sm_get_method_source_file().
int sm_mark_system_class | ( | MOP | classop, |
int | on_or_off | ||
) |
Definition at line 2787 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_UPDATE, CT_ATTRIBUTE_NAME, CT_CLASS_NAME, CT_CLASSAUTH_NAME, CT_COLLATION_NAME, CT_DATATYPE_NAME, CT_DOMAIN_NAME, CT_INDEX_NAME, CT_INDEXKEY_NAME, CT_METHARG_NAME, CT_METHFILE_NAME, CT_METHOD_NAME, CT_METHSIG_NAME, CT_PARTITION_NAME, CT_QUERYSPEC_NAME, CT_STORED_PROC_ARGS_NAME, CT_STORED_PROC_NAME, CTV_ATTR_SD_NAME, CTV_ATTRIBUTE_NAME, CTV_AUTH_NAME, CTV_CLASS_NAME, CTV_INDEX_NAME, CTV_INDEXKEY_NAME, CTV_METHARG_NAME, CTV_METHARG_SD_NAME, CTV_METHFILE_NAME, CTV_METHOD_NAME, CTV_PARTITION_NAME, CTV_STORED_PROC_ARGS_NAME, CTV_STORED_PROC_NAME, CTV_SUPER_CLASS_NAME, CTV_TRIGGER_NAME, CTV_VCLASS_NAME, error(), sm_class::flags, i, locator_find_class(), NO_ERROR, NULL, and SM_CLASSFLAG_SYSTEM.
Referenced by au_install(), catcls_class_install(), and locator_add_root().
void sm_mark_system_classes | ( | void | ) |
Definition at line 2752 of file schema_manager.c.
References au_check_user(), au_fetch_class_force(), AU_FETCH_UPDATE, DB_FETCH_QUERY_WRITE, sm_class::flags, i, locator_free_list_mops(), locator_get_all_mops(), list_mops::mops, NO_ERROR, NULL, list_mops::num, SM_CLASSFLAG_SYSTEM, and WS_IS_DELETED.
Referenced by boot_initialize_client(), and createdb().
Definition at line 4722 of file schema_manager.c.
References sm_class::attributes, au_fetch_class(), au_fetch_instance(), AU_FETCH_READ, AU_SELECT, db_object::class_mop, DB_FETCH_READ, pr_type::get_mem_size_of_mem(), sm_attribute::header, locator_is_class(), sm_component::next, NO_ERROR, NULL, sm_class::object_size, sm_attribute::offset, tf_object_size(), sm_attribute::type, pr_type::variable_p, and ws_pin().
Referenced by ws_dump().
int sm_partitioned_class_type | ( | DB_OBJECT * | classop, |
int * | partition_type, | ||
char * | keyattr, | ||
MOP ** | partitions | ||
) |
Definition at line 3116 of file schema_manager.c.
References ARG_FILE_LINE, assert, AU_DISABLE, AU_ENABLE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, db_value::data, db_get_string(), DB_IS_NULL, db_make_null(), DB_MAX_IDENTIFIER_LENGTH, DB_NOT_PARTITIONED_CLASS, DB_PARTITION_CLASS, DB_PARTITIONED_CLASS, do_get_partition_parent(), ER_ERROR_SEVERITY, ER_PARTITION_WORK_FAILED, er_set(), error(), free_and_init, i, db_data::i, NO_ERROR, NULL, db_objlist::op, p, sm_class::partition, sm_partition::pname, set_get_element_nocopy(), strlen, sm_class::users, and sm_partition::values.
Referenced by au_change_owner_method(), au_grant(), au_revoke(), change_constraints_comment_partitioned_class(), change_constraints_status_partitioned_class(), create_or_drop_index_helper(), do_alter_change_default_cs_coll(), do_check_for_empty_classes_in_delete(), do_check_partitioned_class(), do_insert_template(), do_set_pruning_type(), get_requested_classes(), insert_subquery_results(), is_server_update_allowed(), la_repl_add_object(), ldr_act_init_context(), locator_mflush(), pt_check_alter(), pt_check_create_entity(), pt_check_create_index(), pt_check_show_index(), pt_check_table_in_show_heap(), pt_link_regu_to_selupd_list(), pt_make_class_access_spec(), pt_to_delete_xasl(), pt_to_insert_xasl(), pt_to_merge_insert_xasl(), pt_to_merge_update_xasl(), pt_to_update_xasl(), sm_add_constraint(), sm_delete_class_mop(), sm_drop_index(), sm_exist_index(), sm_rename_class(), smt_is_change_status_allowed(), smt_rename_any(), and update_fk_ref_partitioned_class().
int sm_prelink_methods | ( | DB_OBJLIST * | classes | ) |
Definition at line 1745 of file schema_manager.c.
References assert, AU_EXECUTE, au_fetch_class(), AU_FETCH_READ, db_ws_alloc(), db_ws_free(), er_errid(), error(), sm_method_file::expanded_name, i, sm_class::method_files, sm_class::methods_loaded, schema_def::name, db_namelist::name, sm_method_file::name, db_namelist::next, db_objlist::next, sm_method_file::next, nlist_append(), nlist_free(), NO_ERROR, NULL, db_objlist::op, sm_expand_method_files(), sm_free_method_links(), sm_link_static_methods(), WS_LIST_APPEND, and ws_list_length().
Referenced by db_preload_classes().
char* sm_produce_constraint_name | ( | const char * | class_name, |
DB_CONSTRAINT_TYPE | constraint_type, | ||
const char ** | att_names, | ||
const int * | asc_desc, | ||
const char * | given_name | ||
) |
Definition at line 14363 of file schema_manager.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), intl_identifier_lower(), intl_identifier_lower_string_size(), schema_def::name, NULL, and sm_default_constraint_name().
Referenced by classobj_cache_not_null_constraints(), classobj_copy_constraint_like(), create_or_drop_index_helper(), sm_produce_constraint_name_mop(), sm_produce_constraint_name_tmpl(), and smt_rename_any().
char* sm_produce_constraint_name_mop | ( | MOP | classop, |
DB_CONSTRAINT_TYPE | constraint_type, | ||
const char ** | att_names, | ||
const int * | asc_desc, | ||
const char * | given_name | ||
) |
Definition at line 14402 of file schema_manager.c.
References sm_get_ch_name(), and sm_produce_constraint_name().
Referenced by db_add_constraint(), and db_drop_constraint().
char* sm_produce_constraint_name_tmpl | ( | SM_TEMPLATE * | tmpl, |
DB_CONSTRAINT_TYPE | constraint_type, | ||
const char ** | att_names, | ||
const int * | asc_desc, | ||
const char * | given_name | ||
) |
Definition at line 14419 of file schema_manager.c.
References sm_produce_constraint_name(), and template_classname().
Referenced by classobj_copy_constraint_like(), dbt_add_constraint(), dbt_add_foreign_key(), dbt_drop_constraint(), and do_add_constraints().
Definition at line 2629 of file schema_manager.c.
References assert, AU_ALTER, AU_DISABLE, AU_ENABLE, au_fetch_class(), AU_FETCH_UPDATE, sm_attribute::auto_increment, db_get(), db_get_attributes(), db_get_string(), DB_PARTITIONED_CLASS, db_value_clear(), do_rename_partition(), do_update_auto_increment_serial_on_rename(), er_errid(), ER_LK_UNILATERALLY_ABORTED, ER_REGU_NOT_IMPLEMENTED, error(), ERROR1, sm_attribute::header, locator_prepare_rename_class(), sm_component::name, sm_component::next, NO_ERROR, NULL, rel_major_release_string(), sm_ch_name(), sm_check_name(), sm_downcase_name(), sm_flush_objects(), SM_MAX_IDENTIFIER_LENGTH, sm_partitioned_class_type(), tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_PARTITION_SAVEPOINT_RENAME, ws_copy_string(), and ws_free_string().
Referenced by db_rename_class(), and do_rename_partition().
|
static |
Definition at line 6666 of file schema_manager.c.
References sm_descriptor_list::classobj, classobj_free_desclist(), sm_descriptor::map, sm_descriptor_list::next, sm_descriptor::next, and NULL.
Referenced by install_new_representation(), and sm_transaction_boundary().
SM_NAME_SPACE sm_resolution_space | ( | SM_NAME_SPACE | name_space | ) |
Definition at line 2187 of file schema_manager.c.
References ID_CLASS, ID_CLASS_ATTRIBUTE, ID_CLASS_METHOD, and ID_INSTANCE.
Referenced by check_local_definition(), and resolve_candidates().
int sm_save_constraint_info | ( | SM_CONSTRAINT_INFO ** | save_info, |
const SM_CLASS_CONSTRAINT *const | c | ||
) |
Definition at line 15147 of file schema_manager.c.
References ARG_FILE_LINE, sm_constraint_info::asc_desc, sm_class_constraint::asc_desc, assert, sm_constraint_info::att_names, sm_class_constraint::attributes, sm_class_constraint::attrs_prefix_length, au_fetch_class_force(), AU_FETCH_READ, classobj_find_cons_primary_key(), sm_constraint_info::comment, sm_class_constraint::comment, sm_constraint_info::constraint_type, sm_class::constraints, db_constraint_type(), sm_foreign_key_info::delete_action, er_errid(), ER_ERROR_SEVERITY, ER_FK_REF_CLASS_HAS_NOT_PK, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), sm_constraint_info::filter_predicate, sm_class_constraint::filter_predicate, sm_constraint_info::fk_delete_action, sm_class_constraint::fk_info, sm_constraint_info::fk_update_action, sm_constraint_info::func_index_info, sm_class_constraint::func_index_info, i, sm_constraint_info::index_status, sm_class_constraint::index_status, sm_constraint_info::name, sm_class_constraint::name, sm_constraint_info::next, sm_foreign_key_info::next, NO_ERROR, NULL, sm_constraint_info::prefix_length, sm_constraint_info::ref_attrs, sm_foreign_key_info::ref_class_oid, sm_constraint_info::ref_cls_name, sm_ch_name(), SM_CONSTRAINT_FOREIGN_KEY, sm_free_constraint_info(), sm_save_filter_index_info(), sm_save_function_index_info(), strdup(), strlen, sm_class_constraint::type, sm_foreign_key_info::update_action, and ws_mop().
Referenced by build_attr_change_map(), do_copy_indexes(), do_recreate_renamed_class_indexes(), do_save_all_indexes(), and sm_truncate_class().
int sm_save_filter_index_info | ( | SM_PREDICATE_INFO ** | save_info, |
SM_PREDICATE_INFO * | filter_index_info | ||
) |
Definition at line 15424 of file schema_manager.c.
References ARG_FILE_LINE, sm_predicate_info::att_ids, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, i, NO_ERROR, NULL, sm_predicate_info::num_attrs, sm_predicate_info::pred_stream, sm_predicate_info::pred_stream_size, sm_predicate_info::pred_string, sm_free_filter_index_info(), and strlen.
Referenced by sm_add_secondary_index_on_partition(), sm_exist_index(), and sm_save_constraint_info().
int sm_save_function_index_info | ( | SM_FUNCTION_INFO ** | save_info, |
SM_FUNCTION_INFO * | func_index_info | ||
) |
Definition at line 15358 of file schema_manager.c.
References ARG_FILE_LINE, sm_function_info::attr_index_start, sm_function_info::col_id, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), sm_function_info::expr_str, sm_function_info::expr_stream, sm_function_info::expr_stream_size, sm_function_info::fi_domain, free_and_init, NO_ERROR, NULL, sm_free_function_index_info(), strlen, and tp_domain_copy().
Referenced by do_create_partition_constraint(), sm_add_secondary_index_on_partition(), sm_exist_index(), and sm_save_constraint_info().
|
static |
Definition at line 6245 of file schema_manager.c.
References ARG_FILE_LINE, assert_release, nested_view_version_info::class_object, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), if(), view_cache_info::nested_views, nested_view_version_info::next, NO_ERROR, NULL, parser_alloc(), parser_context::view_cache, sm_class::virtual_cache_global_schema_id, nested_view_version_info::virtual_cache_global_schema_id, sm_class::virtual_cache_local_schema_id, nested_view_version_info::virtual_cache_local_schema_id, sm_class::virtual_cache_snapshot_version, and nested_view_version_info::virtual_cache_snapshot_version.
Referenced by sm_virtual_queries().
int sm_set_class_collation | ( | MOP | classop, |
int | collation_id | ||
) |
Definition at line 2938 of file schema_manager.c.
References assert, au_fetch_class_force(), AU_FETCH_UPDATE, sm_class::collation_id, error(), NO_ERROR, and NULL.
Referenced by do_alter_change_default_cs_coll(), do_create_entity(), and do_create_partition().
Definition at line 2986 of file schema_manager.c.
References assert, au_fetch_class_force(), AU_FETCH_UPDATE, sm_class::comment, er_errid(), ER_FAILED, error(), NO_ERROR, NULL, ws_copy_string(), and ws_free_string().
Referenced by do_alter_change_tbl_comment(), and do_create_entity().
int sm_set_class_flag | ( | MOP | classop, |
SM_CLASS_FLAG | flag, | ||
int | on_or_off | ||
) |
Definition at line 2856 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_UPDATE, error(), sm_class::flags, NO_ERROR, and NULL.
Referenced by do_create_entity(), and do_create_partition().
int sm_set_class_tde_algorithm | ( | MOP | classop, |
TDE_ALGORITHM | tde_algo | ||
) |
Definition at line 2888 of file schema_manager.c.
References assert, au_fetch_class_force(), AU_FETCH_UPDATE, error(), NO_ERROR, NULL, sm_class::tde_algorithm, TDE_ALGORITHM_AES, TDE_ALGORITHM_ARIA, and TDE_ALGORITHM_NONE.
Referenced by do_create_entity(), and do_create_partition().
Definition at line 729 of file schema_manager.c.
References assert, char_isspace(), db_ws_alloc(), db_ws_free(), er_errid(), error(), i, NO_ERROR, NULL, sm_count_tokens(), and ws_copy_string().
Referenced by sm_dynamic_link_class().
int sm_touch_class | ( | MOP | classmop | ) |
Definition at line 15114 of file schema_manager.c.
References assert, dbt_abort_class(), dbt_edit_class(), dbt_finish_class(), er_errid(), error(), NO_ERROR, and NULL.
Referenced by do_run_update_query_for_class().
void sm_transaction_boundary | ( | void | ) |
Definition at line 2114 of file schema_manager.c.
References NULL, sm_free_resident_classes_virtual_query_cache(), and sm_reset_descriptors().
Referenced by tran_abort(), tran_commit(), and tran_internal_abort_upto_savepoint().
int sm_truncate_class | ( | MOP | class_mop | ) |
Definition at line 15627 of file schema_manager.c.
References sm_constraint_info::asc_desc, assert, sm_constraint_info::att_names, AU_DISABLE, AU_ENABLE, au_fetch_class(), AU_FETCH_WRITE, parser_context::au_save, sm_attribute::auto_increment, classobj_find_cons_primary_key(), classobj_is_pk_referred(), sm_constraint_info::comment, sm_constraint_info::constraint_type, sm_class::constraints, db_attribute_next(), DB_AUTH_ALTER, db_get_attributes(), dbt_abort_class(), dbt_add_foreign_key(), dbt_drop_constraint(), dbt_edit_class(), dbt_finish_class(), do_reset_auto_increment_serial(), er_errid(), ER_LK_UNILATERALLY_ABORTED, error(), sm_constraint_info::filter_predicate, sm_constraint_info::fk_delete_action, sm_class_constraint::fk_info, sm_constraint_info::fk_update_action, sm_constraint_info::func_index_info, sm_constraint_info::index_status, log_does_allow_replication(), sm_constraint_info::name, sm_constraint_info::next, sm_class_constraint::next, NO_ERROR, NULL, sm_constraint_info::prefix_length, sm_constraint_info::ref_attrs, sm_constraint_info::ref_cls_name, sm_add_constraint(), SM_CONSTRAINT_FOREIGN_KEY, SM_CONSTRAINT_NOT_NULL, SM_CONSTRAINT_PRIMARY_KEY, sm_drop_constraint(), sm_drop_index(), sm_flush_and_decache_objects(), sm_free_constraint_info(), SM_IS_CONSTRAINT_INDEX_FAMILY, SM_IS_CONSTRAINT_UNIQUE_FAMILY, sm_is_possible_to_recreate_constraint(), sm_save_constraint_info(), SM_TRUNCATE_SAVEPOINT_NAME, sm_truncate_using_delete(), tran_abort_upto_system_savepoint(), tran_system_savepoint(), and sm_class_constraint::type.
Referenced by db_truncate_class().
|
static |
Definition at line 15498 of file schema_manager.c.
References assert, au_fetch_class(), AU_FETCH_WRITE, DB_AUTH_ALTER, db_close_session(), db_compile_statement(), db_execute_statement_local(), db_free_query(), db_get_class_name(), db_get_errors(), DB_MAX_IDENTIFIER_LENGTH, db_open_buffer(), db_statement_count(), er_errid(), ER_FAILED, error(), heap_create(), heap_destroy_newly_created(), HFID_IS_NULL, HFID_SET_NULL, locator_flush_class(), NO_ERROR, NULL, OID_ISTEMP, sm_ch_heap(), sm_is_reuse_oid_class(), tr_set_execution_state(), ws_dirty(), and ws_oid().
Referenced by sm_truncate_class().
int sm_update_all_catalog_statistics | ( | bool | with_fullscan | ) |
Definition at line 4028 of file schema_manager.c.
References CT_ATTRIBUTE_NAME, CT_CHARSET_NAME, CT_CLASS_NAME, CT_CLASSAUTH_NAME, CT_COLLATION_NAME, CT_DATATYPE_NAME, CT_DOMAIN_NAME, CT_INDEX_NAME, CT_INDEXKEY_NAME, CT_METHARG_NAME, CT_METHFILE_NAME, CT_METHOD_NAME, CT_METHSIG_NAME, CT_QUERYSPEC_NAME, error(), i, NO_ERROR, NULL, and sm_update_catalog_statistics().
Referenced by createdb(), do_update_stats(), and loaddb_internal().
int sm_update_all_statistics | ( | bool | with_fullscan | ) |
Definition at line 3976 of file schema_manager.c.
References assert, er_errid(), error(), if(), locator_all_flush(), locator_flush_class(), db_objlist::next, NO_ERROR, NULL, db_object::object, db_objlist::op, sm_class::stats, stats_free_statistics(), stats_get_statistics(), stats_update_all_statistics(), WS_IS_DELETED, WS_OID, and ws_Resident_classes.
Referenced by do_update_stats(), and optimizedb().
Definition at line 4057 of file schema_manager.c.
References assert, db_find_class(), er_errid(), error(), NO_ERROR, NULL, and sm_update_statistics().
Referenced by loaddb_internal(), and sm_update_all_catalog_statistics().
int sm_update_class | ( | SM_TEMPLATE * | template_, |
MOP * | classmop | ||
) |
Definition at line 12880 of file schema_manager.c.
References AU_ALTER, and update_class().
Referenced by add_arg_domain(), au_add_method_check_authorization(), au_install(), boot_define_attribute(), boot_define_charsets(), boot_define_class(), boot_define_class_authorization(), boot_define_collations(), boot_define_data_type(), boot_define_domain(), boot_define_dual(), boot_define_ha_apply_info(), boot_define_index(), boot_define_index_key(), boot_define_meth_argument(), boot_define_meth_file(), boot_define_meth_sig(), boot_define_method(), boot_define_partition(), boot_define_query_spec(), boot_define_serial(), boot_define_stored_procedure(), boot_define_stored_procedure_arguments(), change_constraints_comment_partitioned_class(), change_constraints_status_partitioned_class(), db_add_method_file(), db_add_query_spec(), db_add_set_attribute_domain(), db_change_default(), db_change_method_implementation(), db_change_query_spec(), db_create_class(), db_create_vclass(), db_drop_method_file(), db_drop_method_files(), db_drop_query_spec(), db_drop_set_attribute_domain(), db_set_loader_commands(), do_alter_index_comment(), do_alter_index_rebuild(), do_alter_index_status(), sm_add_constraint(), sm_drop_constraint(), smt_rename_any(), and update_fk_ref_partitioned_class().
int sm_update_class_auto | ( | SM_TEMPLATE * | template_, |
MOP * | classmop | ||
) |
Definition at line 12900 of file schema_manager.c.
References AU_ALTER, and update_class().
Referenced by add_method_internal(), db_add_attribute_internal(), db_add_class_resolution(), db_add_resolution(), db_add_super_internal(), db_drop_class_resolution(), db_drop_resolution(), db_drop_super(), db_drop_super_connect(), db_rename_internal(), and drop_internal().
int sm_update_class_with_auth | ( | SM_TEMPLATE * | template_, |
MOP * | classmop, | ||
DB_AUTH | auth, | ||
bool | needs_hierarchy_lock | ||
) |
Definition at line 12886 of file schema_manager.c.
References update_class().
Referenced by sm_add_constraint().
Definition at line 3905 of file schema_manager.c.
References assert, assert_release, au_fetch_class_force(), AU_FETCH_READ, DB_FETCH_QUERY_READ, DONT_DECACHE, er_errid(), error(), is_class(), locator_flush_all_instances(), locator_flush_class(), locator_is_class(), NO_ERROR, NULL, db_object::object, OID_ISTEMP, sm_class::stats, stats_free_statistics(), stats_get_statistics(), stats_update_statistics(), and WS_OID.
Referenced by do_reorganize_partition_post(), do_update_stats(), ldr_update_statistics(), optimizedb(), sm_add_constraint(), sm_drop_index(), sm_exist_index(), sm_update_catalog_statistics(), update_class(), and update_subclasses().
struct parser_context* sm_virtual_queries | ( | PARSER_CONTEXT * | parser, |
DB_OBJECT * | class_object | ||
) |
Definition at line 6342 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_READ, sm_class::class_type, er_errid(), er_has_error(), ER_HEAP_UNKNOWN_OBJECT, er_stack_pop(), er_stack_push(), error(), mq_free_virtual_query_cache(), mq_virtual_queries(), NO_ERROR, NULL, pt_class_pre_fetch(), pt_has_error, SM_CLASS_CT, sm_global_schema_version(), sm_is_nested_view_recached(), sm_local_schema_version(), sm_save_nested_view_versions(), parser_context::view_cache, sm_class::virtual_cache_global_schema_id, sm_class::virtual_cache_local_schema_id, sm_class::virtual_cache_snapshot_version, sm_class::virtual_query_cache, view_cache_info::vquery_for_query, ws_get_mvcc_snapshot_version(), and ws_pin().
Referenced by mq_fetch_attributes(), mq_fetch_subqueries(), and mq_fetch_subqueries_for_update_local().
|
static |
Definition at line 6920 of file schema_manager.c.
References schema_def::name, NULL, sm_template::op, and sm_get_ch_name().
Referenced by check_alias_domains(), check_invalid_resolutions(), resolve_candidates(), and sm_produce_constraint_name_tmpl().
|
static |
Definition at line 11366 of file schema_manager.c.
References ARG_FILE_LINE, BTID_IS_EQUAL, BTID_IS_NULL, BTID_SET_NULL, db_object::class_mop, classobj_drop_prop(), classobj_find_class_constraint(), classobj_find_class_constraint_by_btid(), classobj_free_class_constraints(), classobj_make_class_constraints(), classobj_put_index(), sm_class::constraints, deallocate_index(), drop_foreign_key_ref(), ER_ERROR_SEVERITY, er_set(), ER_SM_INVALID_PROPERTY, ER_SM_PRIMARY_KEY_EXISTS, error(), sm_attribute::flags, sm_attribute::header, sm_class_constraint::index_btid, inherit_constraint(), sm_template::instance_attributes, is_index_owner(), sm_component::next, sm_class_constraint::next, NO_ERROR, NULL, sm_template::partition, sm_template::properties, rem_class_from_index(), SM_ATTFLAG_PARTITION_KEY, sm_ch_heap(), sm_ch_name(), SM_CONSTRAINT_FOREIGN_KEY, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_REVERSE_INDEX, sm_exist_index(), sm_filter_index_pred_have_invalid_attrs(), SM_IS_CONSTRAINT_INDEX_FAMILY, SM_IS_CONSTRAINT_UNIQUE_FAMILY, sm_is_global_only_constraint(), sm_is_partitioned_class(), SM_PROPERTY_FOREIGN_KEY, SM_PROPERTY_INDEX, SM_PROPERTY_PRIMARY_KEY, SM_PROPERTY_REVERSE_INDEX, SM_PROPERTY_REVERSE_UNIQUE, SM_PROPERTY_UNIQUE, sm_class_constraint::type, and WS_OID.
Referenced by install_new_representation(), and sm_delete_class_mop().
|
static |
Definition at line 12595 of file schema_manager.c.
References abort_subclasses(), allocate_disk_structures(), assert, AU_DISABLE, AU_ENABLE, au_fetch_class(), AU_FETCH_READ, AU_FETCH_UPDATE, parser_context::au_save, AU_SELECT, Au_user, sm_template::class_type, classobj_free_class(), classobj_free_template(), classobj_make_class(), er_errid(), ER_FAILED, ER_HEAP_NODATA_NEWADDRESS, ER_LK_UNILATERALLY_ABORTED, ER_TM_SERVER_DOWN_UNILATERALLY_ABORTED, error(), flatten_subclasses(), flatten_template(), sm_class::inheritance, sm_template::inheritance, install_new_representation(), locator_add_class(), lock_subclasses(), lock_supers(), lockhint_subclasses(), ml_free(), sm_template::name, sm_class::new_, NO_ERROR, NULL, db_objlist::op, sm_template::op, sm_class::owner, sm_template::partition_parent_atts, SM_ADD_UNIQUE_CONSTRAINT_SAVEPOINT_NAME, sm_bump_local_schema_version(), sm_ch_name(), SM_CLASS_CT, sm_update_statistics(), STATS_WITH_SAMPLING, tran_abort_upto_system_savepoint(), tran_system_savepoint(), update_subclasses(), update_supers(), and sm_class::users.
Referenced by sm_finish_class(), sm_update_class(), sm_update_class_auto(), and sm_update_class_with_auth().
|
static |
Definition at line 16237 of file schema_manager.c.
References ARG_FILE_LINE, assert, sm_template::attributes, AU_INDEX, classobj_drop_foreign_key_ref(), classobj_find_cons_primary_key(), classobj_free_class_constraints(), classobj_make_class_constraints(), classobj_put_foreign_key_ref(), DB_NOT_PARTITIONED_CLASS, DB_PARTITION_CLASS, DB_PARTITIONED_CLASS, er_errid(), ER_ERROR_SEVERITY, ER_FK_REF_CLASS_HAS_NOT_PK, ER_NOT_ALLOWED_ACCESS_TO_PARTITION, er_set(), ER_SM_CONSTRAINT_NOT_FOUND, error(), sm_class_constraint::fk_info, free_and_init, i, intl_identifier_casecmp(), sm_foreign_key_info::name, sm_foreign_key_info::next, NO_ERROR, NULL, sm_template::op, sm_template::properties, sm_get_ch_name(), sm_partitioned_class_type(), sm_update_class(), smt_edit_class_mop(), and smt_quit().
Referenced by drop_foreign_key_ref_internal(), and update_foreign_key_ref().
|
static |
Definition at line 10417 of file schema_manager.c.
References ARG_FILE_LINE, assert, sm_class_constraint::attributes, AU_DISABLE, AU_ENABLE, au_fetch_class_force(), AU_FETCH_READ, sm_attribute::class_mop, classobj_find_cons_primary_key(), classobj_put_foreign_key_ref(), sm_class::constraints, dbt_abort_class(), dbt_edit_class(), dbt_finish_class(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_FK_REF_CLASS_HAS_NOT_PK, er_set(), error(), sm_class::inheritance, NO_ERROR, NULL, sm_template::properties, sm_ch_name(), and update_fk_ref_partitioned_class().
Referenced by allocate_foreign_key().
|
static |
Definition at line 12447 of file schema_manager.c.
References allocate_disk_structures(), au_fetch_class_force(), AU_FETCH_UPDATE, sm_class::class_type, classobj_free_template(), sm_class::dont_decache_constraints_or_flush, ER_SM_CORRUPTED, error(), ERROR0, install_new_representation(), sm_class::new_, db_objlist::next, NO_ERROR, NULL, db_objlist::op, SM_CLASS_CT, sm_update_statistics(), and STATS_WITH_SAMPLING.
Referenced by sm_delete_class_mop(), and update_class().
|
static |
Definition at line 12081 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_UPDATE, error(), ml_append(), ml_remove(), db_objlist::next, NO_ERROR, NULL, db_objlist::op, and sm_class::users.
Referenced by update_class().
|
static |
Definition at line 12156 of file schema_manager.c.
References au_fetch_class_force(), AU_FETCH_UPDATE, error(), ml_remove(), db_objlist::next, NO_ERROR, NULL, db_objlist::op, and sm_class::users.
Referenced by sm_delete_class_mop().
|
static |
Definition at line 130 of file schema_manager.c.
|
static |
Definition at line 262 of file schema_manager.c.
Referenced by sm_bump_global_schema_version(), and sm_global_schema_version().
|
static |
Definition at line 261 of file schema_manager.c.
Referenced by sm_bump_local_schema_version(), and sm_local_schema_version().
SM_DESCRIPTOR* sm_Descriptors = NULL |
Definition at line 246 of file schema_manager.c.
Referenced by sm_get_attribute_descriptor(), and sm_get_method_descriptor().
ROOT_CLASS sm_Root_class |
Definition at line 250 of file schema_manager.c.
Referenced by disk_to_root(), tf_class_to_disk(), tf_object_size(), ws_cache(), and ws_decache().
HFID* sm_Root_class_hfid = &sm_Root_class.header.ch_heap |
Definition at line 259 of file schema_manager.c.
Referenced by locator_assign_permanent_oid(), and locator_mflush().
Definition at line 253 of file schema_manager.c.
Referenced by add_class_object(), au_fetch_class_internal(), btree_load_index(), compactdb_start(), db_get_all_chosen_classes(), do_reclaim_class_addresses(), extract_objects(), is_class(), la_flush_repl_items(), locator_add_class(), locator_add_root(), locator_cache(), locator_cache_have_object(), locator_cache_lock(), locator_cache_lock_lockhint_classes(), locator_cache_lock_set(), locator_cache_object_class(), locator_can_skip_fetch_from_server(), locator_demote_class_lock(), locator_fetch_set(), locator_find_class_by_oid(), locator_get_all_class_mops(), locator_is_root(), locator_lock_class_of_instance(), locator_lock_nested(), locator_lock_set(), locator_lockhint_classes(), locator_mflush(), locator_mflush_force(), locator_set_chn_classes_objects(), process_value(), smt_change_query_spec(), tf_need_permanent_oid(), unloaddb(), ws_cache(), ws_clear_hints(), ws_cull_mops(), ws_decache(), ws_decache_all_instances(), ws_decache_allxlockmops_but_norealclasses(), ws_dirty(), ws_disconnect_deleted_instances(), ws_dump(), ws_map_class(), ws_map_class_dirty(), ws_map_dirty_internal(), ws_mop(), ws_pin(), ws_pin_instance_and_class(), ws_print_oid(), ws_remove_resident_class(), and ws_set_lock().
const char* sm_Root_class_name = ROOTCLASS_NAME |
Definition at line 256 of file schema_manager.c.
Referenced by sm_create_root().
|
static |
Definition at line 211 of file schema_manager.c.
Referenced by sm_add_static_method(), and sm_find_static_method().