Skip to content

File schema_manager.c

FileList > cubrid > src > object > schema_manager.c

Go to the source code of this file

  • #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 "authenticate_access_auth.hpp"
  • #include "string_opfunc.h"
  • #include "schema_manager.h"
  • #include "schema_class_truncator.hpp"
  • #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>

Classes

Type Name
struct method_link
struct schema_def
struct sm_candidate
struct static_method

Public Types

Type Name
enum DOMAIN_COMP
typedef struct method_link METHOD_LINK
typedef struct schema_def SCHEMA_DEF
typedef struct sm_candidate SM_CANDIDATE
typedef struct static_method STATIC_METHOD

Public Attributes

Type Name
const char TEXT_CONSTRAINT_PREFIX = "#text\_"
SM_DESCRIPTOR * sm_Descriptors = [**NULL**](freelistheap_8h.md#define-null)
ROOT_CLASS sm_Root_class
HFID * sm_Root_class_hfid = &sm\_Root\_class.header.ch\_heap
MOP sm_Root_class_mop = [**NULL**](freelistheap_8h.md#define-null)
const char * sm_Root_class_name = [**ROOTCLASS\_NAME**](oid_8h.md#define-rootclass_name)

Public Static Attributes

Type Name
SCHEMA_DEF Current_Schema = { {'\0'}, [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null) }
STATIC_METHOD * Static_method_table = [**NULL**](freelistheap_8h.md#define-null)
unsigned int global_schema_version = 0
unsigned int local_schema_version = 0

Public Functions

Type Name
MOP sc_current_schema_owner (void)
int sc_set_current_schema (MOP user)
int sm_active_triggers (MOP class_mop, SM_CLASS * class_, DB_TRIGGER_EVENT event_type)
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)
void sm_add_static_method (const char * name, void(*)() function)
int sm_add_trigger (DB_OBJECT * classop, const char * attribute, int class_attribute, DB_OBJECT * trigger)
bool sm_att_auto_increment (MOP classop, const char * name)
MOP sm_att_class (MOP classop, const char * name)
int sm_att_constrained (MOP classop, const char * name, SM_ATTRIBUTE_FLAG cons)
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)
int sm_att_fk_constrained (MOP classop, const char * name)
int sm_att_id (MOP classop, const char * name)
int sm_att_in_unique_filter_constraint_predicate (MOP classop, const char * name)
int sm_att_info (MOP classop, const char * name, int * idp, TP_DOMAIN ** domainp, int * sharedp, int class_attr)
DB_TYPE sm_att_type_id (MOP classop, const char * name)
int sm_att_unique_constrained (MOP classop, const char * name)
void sm_bump_global_schema_version (void)
void sm_bump_local_schema_version (void)
HFID * sm_ch_heap (MOBJ clobj)
const char * sm_ch_name (const MOBJ clobj)
OID * sm_ch_rep_dir (MOBJ clobj)
int sm_check_catalog_rep_dir (MOP classmop, SM_CLASS * class_)
int sm_check_class_domain (TP_DOMAIN * domain, MOP class_)
int sm_check_name (const char * name)
int sm_check_object_domain (TP_DOMAIN * domain, MOP object)
int sm_check_reuse_oid_class (MOP op)
int sm_class_check_uniques (MOP classop)
SM_CLASS_CONSTRAINT * sm_class_constraints (MOP classop)
int sm_class_has_triggers (DB_OBJECT * classop, int * status_ptr, DB_TRIGGER_EVENT event_type)
int sm_class_has_unique_constraint (MOBJ classobj, MOP classop, bool check_subclasses, bool * has_unique)
int sm_clean_class (MOP classmop, SM_CLASS * class_)
int sm_coerce_object_domain (TP_DOMAIN * domain, MOP object, MOP * dest_object)
void sm_create_root (OID * rootclass_oid, HFID * rootclass_hfid)
int sm_decache_instances_after_query_executed_with_commit (MOP class_mop)
int sm_decache_mop (MOP mop, void * info)
int sm_delete_class (const char * name)
int sm_delete_class_mop (MOP op, bool is_cascade_constraints)
void sm_delete_static_method (const char * name)
int sm_destroy_representations (MOP op)
SM_DOMAIN * sm_domain_alloc ()
SM_DOMAIN * sm_domain_copy (SM_DOMAIN * ptr)
void sm_domain_free (SM_DOMAIN * ptr)
char * sm_downcase_name (const char * name, char * buf, int buf_size)
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)
int sm_drop_index (MOP classop, const char * constraint_name)
int sm_drop_trigger (DB_OBJECT * classop, const char * attribute, int class_attribute, DB_OBJECT * trigger)
int sm_exist_index (MOP classop, const char * idxname, BTID * btid)
DB_OBJLIST * sm_fetch_all_base_classes (int external_list, DB_FETCH_MODE purpose)
DB_OBJLIST * sm_fetch_all_classes (int external_list, DB_FETCH_MODE purpose)
DB_OBJLIST * sm_fetch_all_objects (DB_OBJECT * op, DB_FETCH_MODE purpose)
DB_OBJLIST * sm_fetch_all_objects_of_dirty_version (DB_OBJECT * op, DB_FETCH_MODE purpose)
int sm_filter_domain (TP_DOMAIN * domain, int * changes)
void sm_final ()
MOP sm_find_class (const char * name)
MOP sm_find_class_with_purpose (const char * name, bool for_update)
BTID * sm_find_index (MOP classop, char ** att_names, int num_atts, bool unique_index_only, bool skip_prefix_index, BTID * btid)
int sm_find_subclass_in_hierarchy (MOP hierarchy, MOP class_mop, bool * found)
MOP sm_find_synonym (const char * name)
int sm_finish_class (SM_TEMPLATE * template_, MOP * classmop)
int sm_flush_and_decache_objects (MOP obj, int decache)
int sm_flush_for_multi_update (MOP class_mop)
int sm_flush_objects (MOP obj)
void sm_flush_static_methods ()
int sm_force_method_link (MOP obj)
int sm_force_write_all_classes (void)
void sm_free_constraint_info (SM_CONSTRAINT_INFO ** save_info)
void sm_free_descriptor (SM_DESCRIPTOR * desc)
void sm_free_filter_index_info (SM_PREDICATE_INFO * filter_index_info)
void sm_free_function_index_info (SM_FUNCTION_INFO * func_index_info)
const char * sm_get_att_name (MOP classop, int id)
int sm_get_attribute_descriptor (DB_OBJECT * op, const char * name, int class_attribute, int for_update, SM_DESCRIPTOR ** desc_ptr)
HFID * sm_get_ch_heap (MOP classmop)
const char * sm_get_ch_name (MOP op)
MOP sm_get_class (MOP obj)
int sm_get_class_collation (MOP classop, int * collation_id)
int sm_get_class_flag (MOP op, SM_CLASS_FLAG flag)
int sm_get_class_repid (MOP classop)
int sm_get_class_tde_algorithm (MOP classop, TDE_ALGORITHM * tde_algo)
SM_CLASS * sm_get_class_with_statistics (MOP classop)
int sm_get_descriptor_component (MOP op, SM_DESCRIPTOR * desc, int for_update, SM_CLASS ** class_ptr, SM_COMPONENT ** comp_ptr)
int sm_get_index (MOP classop, const char * attname, BTID * index)
int sm_get_method_descriptor (DB_OBJECT * op, const char * name, int class_method, SM_DESCRIPTOR ** desc_ptr)
char * sm_get_method_source_file (MOP obj, const char * name)
CLASS_STATS * sm_get_statistics_force (MOP classop)
char * sm_get_synonym_target_name (MOP synonym, char * buf, int buf_size)
int sm_get_trigger_cache (DB_OBJECT * classop, const char * attribute, int class_attribute, void ** cache)
unsigned int sm_global_schema_version (void)
bool sm_has_indexes (MOBJ classobj)
int sm_has_non_null_attribute (SM_ATTRIBUTE ** attrs)
int sm_has_text_domain (DB_ATTRIBUTE * attributes, int check_all)
void sm_init (OID * rootclass_oid, HFID * rootclass_hfid)
int sm_invalidate_trigger_cache (DB_OBJECT * classop)
int sm_is_global_only_constraint (MOP classmop, SM_CLASS_CONSTRAINT * constraint, int * is_global, SM_TEMPLATE * template_)
bool sm_is_index_visible (SM_CLASS_CONSTRAINT * constraint_list, BTID btid)
int sm_is_partition (MOP classmop, MOP supermop)
int sm_is_partitioned_class (MOP op)
bool sm_is_possible_to_recreate_constraint (MOP class_mop, const SM_CLASS *const class_, const SM_CLASS_CONSTRAINT *const constraint)
bool sm_is_reuse_oid_class (MOP op)
int sm_is_subclass (MOP classmop, MOP supermop)
int sm_is_system_class (MOP op)
int sm_issystem (SM_CLASS * class_)
int sm_link_method (SM_CLASS * class_, SM_METHOD * method)
unsigned int sm_local_schema_version (void)
int sm_mark_system_class (MOP classop, int on_or_off)
void sm_mark_system_class_for_catalog (void)
int sm_object_size_quick (SM_CLASS * class_, MOBJ obj)
int sm_partitioned_class_type (DB_OBJECT * classop, int * partition_type, char * keyattr, MOP ** partitions)
int sm_prelink_methods (DB_OBJLIST * 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)
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)
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)
char * sm_qualifier_name (const char * name, char * buf, int buf_size)
const char * sm_remove_qualifier_name (const char * name)
int sm_rename_class (MOP class_mop, const char * new_name)
SM_NAME_SPACE sm_resolution_space (SM_NAME_SPACE name_space)
int sm_save_constraint_info (SM_CONSTRAINT_INFO ** save_info, const SM_CLASS_CONSTRAINT *const c)
int sm_save_filter_index_info (SM_PREDICATE_INFO ** save_info, SM_PREDICATE_INFO * filter_index_info)
int sm_save_function_index_info (SM_FUNCTION_INFO ** save_info, SM_FUNCTION_INFO * func_index_info)
int sm_set_class_collation (MOP classop, int collation_id)
int sm_set_class_comment (MOP classop, const char * comment)
int sm_set_class_flag (MOP classop, SM_CLASS_FLAG flag, int on_or_off)
int sm_set_class_tde_algorithm (MOP classop, TDE_ALGORITHM tde_algo)
int sm_touch_class (MOP classmop)
void sm_transaction_boundary (void)
int sm_truncate_class (MOP class_mop, const bool is_cascade)
int sm_truncate_using_delete (MOP class_mop)
int sm_truncate_using_destroy_heap (MOP class_mop)
int sm_update_all_catalog_statistics (bool with_fullscan)
int sm_update_all_statistics (bool with_fullscan)
int sm_update_catalog_statistics (const char * class_name, bool with_fullscan)
int sm_update_class (SM_TEMPLATE * template_, MOP * classmop)
int sm_update_class_auto (SM_TEMPLATE * template_, MOP * classmop)
int sm_update_class_with_auth (SM_TEMPLATE * template_, MOP * classmop, DB_AUTH auth, bool needs_hierarchy_lock)
int sm_update_statistics (MOP classop, bool with_fullscan)
int sm_update_statistics_without_gathering_stats (MOP classop, bool with_fullscan)
char * sm_user_specified_name (const char * name, char * buf, int buf_size)
char * sm_user_specified_name_for_serial (const char * name, char * buf, int buf_size)
struct parser_context * sm_virtual_queries (PARSER_CONTEXT * parser, DB_OBJECT * class_object)

Public Static Functions

Type Name
void abort_subclasses (DB_OBJLIST * subclasses)
void add_candidate (SM_CANDIDATE ** candlist, SM_COMPONENT * comp, int order, MOP source, SM_RESOLUTION * resolutions)
int allocate_disk_structures (MOP classop, SM_CLASS * class_, DB_OBJLIST * subclasses, SM_TEMPLATE * template_)
int allocate_disk_structures_index (MOP classop, SM_CLASS * class_, SM_CLASS_CONSTRAINT * con, DB_OBJLIST * subclasses, SM_TEMPLATE * template_)
int allocate_foreign_key (MOP classop, SM_CLASS * class_, SM_CLASS_CONSTRAINT * con, DB_OBJLIST * subclasses)
int allocate_index (MOP classop, SM_CLASS * class_, DB_OBJLIST * subclasses, SM_CLASS_CONSTRAINT * con)
int allocate_unique_constraint (MOP classop, SM_CLASS * class_, SM_CLASS_CONSTRAINT * con, DB_OBJLIST * subclasses, SM_TEMPLATE * template_)
int alter_trigger_cache (SM_CLASS * class_, const char * attribute, int class_attribute, DB_OBJECT * trigger, int drop_it)
int alter_trigger_hierarchy (DB_OBJECT * classop, const char * attribute, int class_attribute, DB_OBJECT * target_class, DB_OBJECT * trigger, int drop_it)
int annotate_method_files (MOP classmop, SM_CLASS * class_)
void assign_attribute_id (SM_CLASS * class_, SM_ATTRIBUTE * att, int class_attribute)
void assign_method_id (SM_CLASS * class_, SM_METHOD * method, bool class_method)
void auto_resolve_conflict (SM_CANDIDATE * candidate, SM_RESOLUTION ** resolutions, SM_NAME_SPACE resspace)
int build_storage_order (SM_CLASS * class_, SM_TEMPLATE * flat)
const char * candidate_source_name (SM_TEMPLATE * template_, SM_CANDIDATE * candidate)
int check_alias_conflict (SM_TEMPLATE * template_, SM_CANDIDATE * candidates)
int check_alias_domains (SM_TEMPLATE * template_, SM_CANDIDATE * candidates, SM_CANDIDATE ** most_specific)
int check_attribute_method_overlap (SM_TEMPLATE * template_, SM_CANDIDATE * candidates)
int check_fk_validity (MOP classop, SM_CLASS * class_, SM_ATTRIBUTE ** key_attrs, const int * asc_desc, OID * pk_cls_oid, BTID * pk_btid, char * fk_name)
void check_inherited_attributes (MOP classmop, SM_CLASS * class_, SM_TEMPLATE * flat)
int check_invalid_resolutions (SM_TEMPLATE * template_, SM_RESOLUTION ** resolutions, SM_RESOLUTION * original_list)
int check_resolution_target (SM_TEMPLATE * template_, SM_RESOLUTION * res, int * valid_ptr)
int collect_hier_class_info (MOP classop, DB_OBJLIST * subclasses, const char * constraint_name, int reverse, int * n_classes, int n_attrs, OID * oids, int * attr_ids, HFID * hfids)
DOMAIN_COMP compare_argument_domains (SM_METHOD * m1, SM_METHOD * m2)
DOMAIN_COMP compare_component_domains (SM_COMPONENT * c1, SM_COMPONENT * c2)
DOMAIN_COMP compare_domains (TP_DOMAIN * d1, TP_DOMAIN * d2)
TP_DOMAIN * construct_index_key_domain (int n_atts, SM_ATTRIBUTE ** atts, const int * asc_desc, const int * prefix_lengths, int func_col_id, TP_DOMAIN * func_domain)
int deallocate_index (SM_CLASS_CONSTRAINT * cons, BTID * index)
int domain_search (MOP dclass_mop, MOP class_mop)
int drop_foreign_key_ref (MOP classop, SM_CLASS * class_, SM_CLASS_CONSTRAINT * flat_cons, SM_CLASS_CONSTRAINT ** cons)
int drop_foreign_key_ref_internal (MOP classop, SM_CLASS_CONSTRAINT * flat_cons, SM_CLASS_CONSTRAINT * cons)
int fetch_descriptor_class (MOP op, SM_DESCRIPTOR * desc, int for_update, SM_CLASS ** class_)
void filter_component_resolutions (SM_TEMPLATE * template_, const char * name, SM_NAME_SPACE resspace)
int filter_local_constraints (SM_TEMPLATE * template_, SM_CLASS * super_class)
void filter_reslist (SM_RESOLUTION ** reslist, MOP deleted_class)
int filter_resolutions (SM_TEMPLATE * def, SM_TEMPLATE * flat, MOP deleted_class)
SM_METHOD_ARGUMENT * find_argument (SM_METHOD_SIGNATURE * sig, int argnum)
int find_attribute_op (MOP op, const char * name, SM_CLASS ** classp, SM_ATTRIBUTE ** attp)
MOP find_index_catalog (const char * index_name)
SM_ATTRIBUTE * find_matching_att (SM_ATTRIBUTE * list, SM_ATTRIBUTE * att, int idmatch)
int find_superclass (DB_OBJECT * classop, SM_TEMPLATE * temp, DB_OBJECT * super)
void fixup_attribute_self_domain (SM_ATTRIBUTE * att, MOP self)
void fixup_component_classes (MOP classop, SM_TEMPLATE * flat)
void fixup_method_self_domains (SM_METHOD * meth, MOP self)
void fixup_self_domain (TP_DOMAIN * domain, MOP self)
void fixup_self_reference_domains (MOP classop, SM_TEMPLATE * flat)
int flatten_components (SM_TEMPLATE * def, SM_TEMPLATE * flat, SM_NAME_SPACE name_space, int auto_res)
int flatten_method_files (SM_TEMPLATE * def, SM_TEMPLATE * flat)
int flatten_partition_info (SM_TEMPLATE * def, SM_TEMPLATE * flat)
int flatten_properties (SM_TEMPLATE * def, SM_TEMPLATE * flat)
int flatten_query_spec_lists (SM_TEMPLATE * def, SM_TEMPLATE * flat)
int flatten_subclasses (DB_OBJLIST * subclasses, MOP deleted_class)
int flatten_template (SM_TEMPLATE * def, MOP deleted_class, SM_TEMPLATE ** flatp, int auto_res)
int flatten_trigger_cache (SM_TEMPLATE * def, SM_TEMPLATE * flat)
void free_candidates (SM_CANDIDATE * candidates)
SM_CANDIDATE * get_candidates (SM_TEMPLATE * def, SM_TEMPLATE * flat, SM_NAME_SPACE name_space)
int inherit_constraint (MOP classop, SM_CLASS_CONSTRAINT * con)
void insert_attribute (SM_ATTRIBUTE ** attlist, SM_ATTRIBUTE * att)
void insert_method (SM_METHOD ** methlist, SM_METHOD * method)
int install_new_representation (MOP classop, SM_CLASS * class_, SM_TEMPLATE * flat)
void invalidate_unused_triggers (MOP class_mop, SM_CLASS * class_, SM_TEMPLATE * flat)
bool is_index_owner (MOP classop, SM_CLASS_CONSTRAINT * con)
int lock_query_subclasses (DB_OBJLIST ** subclasses, MOP op, DB_OBJLIST * exceptions, int update)
int lock_subclasses (SM_TEMPLATE * def, DB_OBJLIST * newsupers, DB_OBJLIST * cursubs, DB_OBJLIST ** newsubs)
int lock_subclasses_internal (SM_TEMPLATE * def, MOP op, DB_OBJLIST * newsupers, DB_OBJLIST ** newsubs)
int lock_supers (SM_TEMPLATE * def, DB_OBJLIST * current, DB_OBJLIST ** oldlist, DB_OBJLIST ** newlist)
int lock_supers_drop (DB_OBJLIST * supers)
int lockhint_subclasses (SM_TEMPLATE * temp, SM_CLASS * class_)
SM_CANDIDATE * make_candidate_from_component (SM_COMPONENT * comp, MOP source)
SM_COMPONENT * make_component_from_candidate (MOP classop, SM_CANDIDATE * cand)
SM_ATTRIBUTE * order_atts_by_alignment (SM_ATTRIBUTE * atts)
SM_CANDIDATE * prune_candidate (SM_CANDIDATE ** clist_pointer)
int rem_class_from_index (OID * oid, BTID * index, HFID * heap)
int remove_class_triggers (MOP classop, SM_CLASS * class_)
void remove_shadowed_resolutions (SM_TEMPLATE * original, SM_TEMPLATE * flat)
int resolve_candidates (SM_TEMPLATE * template_, SM_CANDIDATE * candidates, int auto_resolve, SM_CANDIDATE ** winner_return)
int retain_former_ids (SM_TEMPLATE * flat)
void save_previous_value (SM_ATTRIBUTE * old, SM_ATTRIBUTE * new_)
const char * sc_current_schema_name (void)
int sm_add_secondary_index_on_partition (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, MOP * sub_partitions)
int sm_build_function_nlist (METHOD_LINK * links, struct nlist ** nlist_ptr)
bool sm_constraint_belongs_to_class (const SM_CLASS_CONSTRAINT *const con, MOP const mop)
int sm_count_tokens (const char * string, int * maxcharp)
char * sm_default_constraint_name (const char * class_name, DB_CONSTRAINT_TYPE type, const char ** att_names, const int * asc_desc)
int sm_drop_cascade_foreign_key (SM_CLASS * class_)
int sm_dynamic_link_class (SM_CLASS * class_, METHOD_LINK * links)
int sm_expand_method_files (SM_METHOD_FILE * files)
DB_OBJLIST * sm_fetch_all_objects_internal (DB_OBJECT * op, DB_FETCH_MODE purpose, LC_FETCH_VERSION_TYPE * force_fetch_version_type)
int sm_file_extension (const char * path, const char * ext)
bool sm_filter_index_pred_have_invalid_attrs (SM_CLASS_CONSTRAINT * constraint, char * class_name, SM_ATTRIBUTE * old_atts, SM_ATTRIBUTE * new_atts)
STATIC_METHOD * sm_find_static_method (const char * name)
int sm_flush_and_decache_objects_internal (MOP obj, MOP obj_class_mop, int decache)
void sm_free_function_nlist (struct nlist * namelist)
void sm_free_loader_commands (char ** commands)
void sm_free_method_links (METHOD_LINK * links)
void sm_free_resident_classes_virtual_query_cache (void)
DB_OBJLIST * sm_get_all_classes (int external_list)
DB_OBJLIST * sm_get_all_objects (DB_OBJECT * op)
int sm_get_att_domain (MOP op, const char * name, TP_DOMAIN ** domain)
DB_OBJLIST * sm_get_base_classes (int external_list)
const char * sm_get_class_name (MOP op)
const char * sm_get_class_name_internal (MOP op, bool return_null)
const char * sm_get_class_name_not_null (MOP op)
TP_DOMAIN * sm_get_set_domain (MOP classop, int att_id)
int sm_has_constraint (MOBJ classobj, SM_ATTRIBUTE_FLAG constraint)
bool sm_is_nested_view_recached (PARSER_CONTEXT * parser)
int sm_link_methods (SM_CLASS * class_)
int sm_link_static_method (SM_METHOD * method, METHOD_LINK ** link_ptr)
int sm_link_static_methods (SM_CLASS * class_, METHOD_LINK ** links_ptr)
int sm_load_online_index (MOP classmop, const char * constraint_name)
const char * sm_locate_method_file (SM_CLASS * class_, const char * function)
int sm_object_disk_size (MOP op)
void sm_print (MOP classmop)
DB_OBJLIST * sm_query_lock (MOP classop, DB_OBJLIST * exceptions, int only, int update)
void sm_reset_descriptors (MOP class_)
int sm_save_nested_view_versions (PARSER_CONTEXT * parser, DB_OBJECT * class_object, SM_CLASS * class_)
int sm_split_loader_commands (const char * string, const char *** command_ptr)
const char * sm_type_name (DB_TYPE id)
int sm_update_trigger_cache (DB_OBJECT * class_, const char * attribute, int class_attribute, void * cache)
const char * template_classname (SM_TEMPLATE * template_)
int transfer_disk_structures (MOP classop, SM_CLASS * class_, SM_TEMPLATE * flat)
int update_class (SM_TEMPLATE * template_, MOP * classmop, int auto_res, DB_AUTH auth, bool needs_hierarchy_lock)
int update_fk_ref_partitioned_class (SM_TEMPLATE * ctemplate, SM_FOREIGN_KEY_INFO * fk_info, const BTID * btid, const char * old_name, const char * new_name)
int update_foreign_key_ref (MOP ref_clsop, SM_FOREIGN_KEY_INFO * fk_info)
int update_subclasses (DB_OBJLIST * subclasses)
int update_supers (MOP classop, DB_OBJLIST * oldsupers, DB_OBJLIST * newsupers)
int update_supers_drop (MOP classop, DB_OBJLIST * supers)

Macros

Type Name
define MAX_ATTR_IN_AUTO_GEN_NAME 30
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**](broker__monitor_8c.md#function-timeout)'.'

Public Types Documentation

enum DOMAIN_COMP

enum DOMAIN_COMP {
    DC_INCOMPATIBLE,
    DC_EQUAL,
    DC_LESS_SPECIFIC,
    DC_MORE_SPECIFIC
};

typedef struct method_link METHOD_LINK;

typedef SCHEMA_DEF

typedef struct schema_def SCHEMA_DEF;

typedef SM_CANDIDATE

typedef struct sm_candidate SM_CANDIDATE;

typedef STATIC_METHOD

typedef struct static_method STATIC_METHOD;

Public Attributes Documentation

variable TEXT_CONSTRAINT_PREFIX

const char TEXT_CONSTRAINT_PREFIX[];

variable sm_Descriptors

SM_DESCRIPTOR* sm_Descriptors;

variable sm_Root_class

ROOT_CLASS sm_Root_class;

variable sm_Root_class_hfid

HFID* sm_Root_class_hfid;

variable sm_Root_class_mop

MOP sm_Root_class_mop;

variable sm_Root_class_name

const char* sm_Root_class_name;

Public Static Attributes Documentation

variable Current_Schema

SCHEMA_DEF Current_Schema;

variable Static_method_table

STATIC_METHOD* Static_method_table;

variable global_schema_version

unsigned int global_schema_version;

variable local_schema_version

unsigned int local_schema_version;

Public Functions Documentation

function sc_current_schema_owner

MOP sc_current_schema_owner (
    void
) 

function sc_set_current_schema

int sc_set_current_schema (
    MOP user
) 

function sm_active_triggers

int sm_active_triggers (
    MOP class_mop,
    SM_CLASS * class_,
    DB_TRIGGER_EVENT event_type
) 

function sm_add_constraint

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
) 

function sm_add_static_method

void sm_add_static_method (
    const  char * name,
    void (*)() function
) 

function sm_add_trigger

int sm_add_trigger (
    DB_OBJECT * classop,
    const  char * attribute,
    int class_attribute,
    DB_OBJECT * trigger
) 

function sm_att_auto_increment

bool sm_att_auto_increment (
    MOP classop,
    const  char * name
) 

function sm_att_class

MOP sm_att_class (
    MOP classop,
    const  char * name
) 

function sm_att_constrained

int sm_att_constrained (
    MOP classop,
    const  char * name,
    SM_ATTRIBUTE_FLAG cons
) 

function sm_att_default_value

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
) 

function sm_att_fk_constrained

int sm_att_fk_constrained (
    MOP classop,
    const  char * name
) 

function sm_att_id

int sm_att_id (
    MOP classop,
    const  char * name
) 

function sm_att_in_unique_filter_constraint_predicate

int sm_att_in_unique_filter_constraint_predicate (
    MOP classop,
    const  char * name
) 

function sm_att_info

int sm_att_info (
    MOP classop,
    const  char * name,
    int * idp,
    TP_DOMAIN ** domainp,
    int * sharedp,
    int class_attr
) 

function sm_att_type_id

DB_TYPE sm_att_type_id (
    MOP classop,
    const  char * name
) 

function sm_att_unique_constrained

int sm_att_unique_constrained (
    MOP classop,
    const  char * name
) 

function sm_bump_global_schema_version

void sm_bump_global_schema_version (
    void
) 

function sm_bump_local_schema_version

void sm_bump_local_schema_version (
    void
) 

function sm_ch_heap

HFID * sm_ch_heap (
    MOBJ clobj
) 

function sm_ch_name

const  char * sm_ch_name (
    const  MOBJ clobj
) 

function sm_ch_rep_dir

OID * sm_ch_rep_dir (
    MOBJ clobj
) 

function sm_check_catalog_rep_dir

int sm_check_catalog_rep_dir (
    MOP classmop,
    SM_CLASS * class_
) 

function sm_check_class_domain

int sm_check_class_domain (
    TP_DOMAIN * domain,
    MOP class_
) 

function sm_check_name

int sm_check_name (
    const  char * name
) 

function sm_check_object_domain

int sm_check_object_domain (
    TP_DOMAIN * domain,
    MOP object
) 

function sm_check_reuse_oid_class

int sm_check_reuse_oid_class (
    MOP op
) 

function sm_class_check_uniques

int sm_class_check_uniques (
    MOP classop
) 

function sm_class_constraints

SM_CLASS_CONSTRAINT * sm_class_constraints (
    MOP classop
) 

function sm_class_has_triggers

int sm_class_has_triggers (
    DB_OBJECT * classop,
    int * status_ptr,
    DB_TRIGGER_EVENT event_type
) 

function sm_class_has_unique_constraint

int sm_class_has_unique_constraint (
    MOBJ classobj,
    MOP classop,
    bool check_subclasses,
    bool * has_unique
) 

function sm_clean_class

int sm_clean_class (
    MOP classmop,
    SM_CLASS * class_
) 

function sm_coerce_object_domain

int sm_coerce_object_domain (
    TP_DOMAIN * domain,
    MOP object,
    MOP * dest_object
) 

function sm_create_root

void sm_create_root (
    OID * rootclass_oid,
    HFID * rootclass_hfid
) 

function sm_decache_instances_after_query_executed_with_commit

int sm_decache_instances_after_query_executed_with_commit (
    MOP class_mop
) 

function sm_decache_mop

int sm_decache_mop (
    MOP mop,
    void * info
) 

function sm_delete_class

int sm_delete_class (
    const  char * name
) 

function sm_delete_class_mop

int sm_delete_class_mop (
    MOP op,
    bool is_cascade_constraints
) 

function sm_delete_static_method

void sm_delete_static_method (
    const  char * name
) 

function sm_destroy_representations

int sm_destroy_representations (
    MOP op
) 

function sm_domain_alloc

SM_DOMAIN * sm_domain_alloc () 

function sm_domain_copy

SM_DOMAIN * sm_domain_copy (
    SM_DOMAIN * ptr
) 

function sm_domain_free

void sm_domain_free (
    SM_DOMAIN * ptr
) 

function sm_downcase_name

char * sm_downcase_name (
    const  char * name,
    char * buf,
    int buf_size
) 

function sm_drop_constraint

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
) 

function sm_drop_index

int sm_drop_index (
    MOP classop,
    const  char * constraint_name
) 

function sm_drop_trigger

int sm_drop_trigger (
    DB_OBJECT * classop,
    const  char * attribute,
    int class_attribute,
    DB_OBJECT * trigger
) 

function sm_exist_index

int sm_exist_index (
    MOP classop,
    const  char * idxname,
    BTID * btid
) 

function sm_fetch_all_base_classes

DB_OBJLIST * sm_fetch_all_base_classes (
    int external_list,
    DB_FETCH_MODE purpose
) 

function sm_fetch_all_classes

DB_OBJLIST * sm_fetch_all_classes (
    int external_list,
    DB_FETCH_MODE purpose
) 

function sm_fetch_all_objects

DB_OBJLIST * sm_fetch_all_objects (
    DB_OBJECT * op,
    DB_FETCH_MODE purpose
) 

function sm_fetch_all_objects_of_dirty_version

DB_OBJLIST * sm_fetch_all_objects_of_dirty_version (
    DB_OBJECT * op,
    DB_FETCH_MODE purpose
) 

function sm_filter_domain

int sm_filter_domain (
    TP_DOMAIN * domain,
    int * changes
) 

function sm_final

void sm_final () 

function sm_find_class

MOP sm_find_class (
    const  char * name
) 

function sm_find_class_with_purpose

MOP sm_find_class_with_purpose (
    const  char * name,
    bool for_update
) 

function sm_find_index

BTID * sm_find_index (
    MOP classop,
    char ** att_names,
    int num_atts,
    bool unique_index_only,
    bool skip_prefix_index,
    BTID * btid
) 

function sm_find_subclass_in_hierarchy

int sm_find_subclass_in_hierarchy (
    MOP hierarchy,
    MOP class_mop,
    bool * found
) 

function sm_find_synonym

MOP sm_find_synonym (
    const  char * name
) 

function sm_finish_class

int sm_finish_class (
    SM_TEMPLATE * template_,
    MOP * classmop
) 

function sm_flush_and_decache_objects

int sm_flush_and_decache_objects (
    MOP obj,
    int decache
) 

function sm_flush_for_multi_update

int sm_flush_for_multi_update (
    MOP class_mop
) 

function sm_flush_objects

int sm_flush_objects (
    MOP obj
) 

function sm_flush_static_methods

void sm_flush_static_methods () 

int sm_force_method_link (
    MOP obj
) 

function sm_force_write_all_classes

int sm_force_write_all_classes (
    void
) 

function sm_free_constraint_info

void sm_free_constraint_info (
    SM_CONSTRAINT_INFO ** save_info
) 

function sm_free_descriptor

void sm_free_descriptor (
    SM_DESCRIPTOR * desc
) 

function sm_free_filter_index_info

void sm_free_filter_index_info (
    SM_PREDICATE_INFO * filter_index_info
) 

function sm_free_function_index_info

void sm_free_function_index_info (
    SM_FUNCTION_INFO * func_index_info
) 

function sm_get_att_name

const  char * sm_get_att_name (
    MOP classop,
    int id
) 

function sm_get_attribute_descriptor

int sm_get_attribute_descriptor (
    DB_OBJECT * op,
    const  char * name,
    int class_attribute,
    int for_update,
    SM_DESCRIPTOR ** desc_ptr
) 

function sm_get_ch_heap

HFID * sm_get_ch_heap (
    MOP classmop
) 

function sm_get_ch_name

const  char * sm_get_ch_name (
    MOP op
) 

function sm_get_class

MOP sm_get_class (
    MOP obj
) 

function sm_get_class_collation

int sm_get_class_collation (
    MOP classop,
    int * collation_id
) 

function sm_get_class_flag

int sm_get_class_flag (
    MOP op,
    SM_CLASS_FLAG flag
) 

function sm_get_class_repid

int sm_get_class_repid (
    MOP classop
) 

function sm_get_class_tde_algorithm

int sm_get_class_tde_algorithm (
    MOP classop,
    TDE_ALGORITHM * tde_algo
) 

function sm_get_class_with_statistics

SM_CLASS * sm_get_class_with_statistics (
    MOP classop
) 

function sm_get_descriptor_component

int sm_get_descriptor_component (
    MOP op,
    SM_DESCRIPTOR * desc,
    int for_update,
    SM_CLASS ** class_ptr,
    SM_COMPONENT ** comp_ptr
) 

function sm_get_index

int sm_get_index (
    MOP classop,
    const  char * attname,
    BTID * index
) 

function sm_get_method_descriptor

int sm_get_method_descriptor (
    DB_OBJECT * op,
    const  char * name,
    int class_method,
    SM_DESCRIPTOR ** desc_ptr
) 

function sm_get_method_source_file

char * sm_get_method_source_file (
    MOP obj,
    const  char * name
) 

function sm_get_statistics_force

CLASS_STATS * sm_get_statistics_force (
    MOP classop
) 

function sm_get_synonym_target_name

char * sm_get_synonym_target_name (
    MOP synonym,
    char * buf,
    int buf_size
) 

function sm_get_trigger_cache

int sm_get_trigger_cache (
    DB_OBJECT * classop,
    const  char * attribute,
    int class_attribute,
    void ** cache
) 

function sm_global_schema_version

unsigned  int sm_global_schema_version (
    void
) 

function sm_has_indexes

bool sm_has_indexes (
    MOBJ classobj
) 

function sm_has_non_null_attribute

int sm_has_non_null_attribute (
    SM_ATTRIBUTE ** attrs
) 

function sm_has_text_domain

int sm_has_text_domain (
    DB_ATTRIBUTE * attributes,
    int check_all
) 

function sm_init

void sm_init (
    OID * rootclass_oid,
    HFID * rootclass_hfid
) 

function sm_invalidate_trigger_cache

int sm_invalidate_trigger_cache (
    DB_OBJECT * classop
) 

function sm_is_global_only_constraint

int sm_is_global_only_constraint (
    MOP classmop,
    SM_CLASS_CONSTRAINT * constraint,
    int * is_global,
    SM_TEMPLATE * template_
) 

function sm_is_index_visible

bool sm_is_index_visible (
    SM_CLASS_CONSTRAINT * constraint_list,
    BTID btid
) 

function sm_is_partition

int sm_is_partition (
    MOP classmop,
    MOP supermop
) 

function sm_is_partitioned_class

int sm_is_partitioned_class (
    MOP op
) 

function sm_is_possible_to_recreate_constraint

bool sm_is_possible_to_recreate_constraint (
    MOP class_mop,
    const  SM_CLASS * const class_,
    const  SM_CLASS_CONSTRAINT * const constraint
) 

function sm_is_reuse_oid_class

bool sm_is_reuse_oid_class (
    MOP op
) 

function sm_is_subclass

int sm_is_subclass (
    MOP classmop,
    MOP supermop
) 

function sm_is_system_class

int sm_is_system_class (
    MOP op
) 

function sm_issystem

int sm_issystem (
    SM_CLASS * class_
) 

int sm_link_method (
    SM_CLASS * class_,
    SM_METHOD * method
) 

function sm_local_schema_version

unsigned  int sm_local_schema_version (
    void
) 

function sm_mark_system_class

int sm_mark_system_class (
    MOP classop,
    int on_or_off
) 

function sm_mark_system_class_for_catalog

void sm_mark_system_class_for_catalog (
    void
) 

function sm_object_size_quick

int sm_object_size_quick (
    SM_CLASS * class_,
    MOBJ obj
) 

function sm_partitioned_class_type

int sm_partitioned_class_type (
    DB_OBJECT * classop,
    int * partition_type,
    char * keyattr,
    MOP ** partitions
) 

int sm_prelink_methods (
    DB_OBJLIST * classes
) 

function sm_produce_constraint_name

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
) 

function sm_produce_constraint_name_mop

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
) 

function sm_produce_constraint_name_tmpl

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
) 

function sm_qualifier_name

char * sm_qualifier_name (
    const  char * name,
    char * buf,
    int buf_size
) 

function sm_remove_qualifier_name

const  char * sm_remove_qualifier_name (
    const  char * name
) 

function sm_rename_class

int sm_rename_class (
    MOP class_mop,
    const  char * new_name
) 

function sm_resolution_space

SM_NAME_SPACE sm_resolution_space (
    SM_NAME_SPACE name_space
) 

function sm_save_constraint_info

int sm_save_constraint_info (
    SM_CONSTRAINT_INFO ** save_info,
    const  SM_CLASS_CONSTRAINT * const c
) 

function sm_save_filter_index_info

int sm_save_filter_index_info (
    SM_PREDICATE_INFO ** save_info,
    SM_PREDICATE_INFO * filter_index_info
) 

function sm_save_function_index_info

int sm_save_function_index_info (
    SM_FUNCTION_INFO ** save_info,
    SM_FUNCTION_INFO * func_index_info
) 

function sm_set_class_collation

int sm_set_class_collation (
    MOP classop,
    int collation_id
) 

function sm_set_class_comment

int sm_set_class_comment (
    MOP classop,
    const  char * comment
) 

function sm_set_class_flag

int sm_set_class_flag (
    MOP classop,
    SM_CLASS_FLAG flag,
    int on_or_off
) 

function sm_set_class_tde_algorithm

int sm_set_class_tde_algorithm (
    MOP classop,
    TDE_ALGORITHM tde_algo
) 

function sm_touch_class

int sm_touch_class (
    MOP classmop
) 

function sm_transaction_boundary

void sm_transaction_boundary (
    void
) 

function sm_truncate_class

int sm_truncate_class (
    MOP class_mop,
    const  bool is_cascade
) 

function sm_truncate_using_delete

int sm_truncate_using_delete (
    MOP class_mop
) 

function sm_truncate_using_destroy_heap

int sm_truncate_using_destroy_heap (
    MOP class_mop
) 

function sm_update_all_catalog_statistics

int sm_update_all_catalog_statistics (
    bool with_fullscan
) 

function sm_update_all_statistics

int sm_update_all_statistics (
    bool with_fullscan
) 

function sm_update_catalog_statistics

int sm_update_catalog_statistics (
    const  char * class_name,
    bool with_fullscan
) 

function sm_update_class

int sm_update_class (
    SM_TEMPLATE * template_,
    MOP * classmop
) 

function sm_update_class_auto

int sm_update_class_auto (
    SM_TEMPLATE * template_,
    MOP * classmop
) 

function sm_update_class_with_auth

int sm_update_class_with_auth (
    SM_TEMPLATE * template_,
    MOP * classmop,
    DB_AUTH auth,
    bool needs_hierarchy_lock
) 

function sm_update_statistics

int sm_update_statistics (
    MOP classop,
    bool with_fullscan
) 

function sm_update_statistics_without_gathering_stats

int sm_update_statistics_without_gathering_stats (
    MOP classop,
    bool with_fullscan
) 

function sm_user_specified_name

char * sm_user_specified_name (
    const  char * name,
    char * buf,
    int buf_size
) 

function sm_user_specified_name_for_serial

char * sm_user_specified_name_for_serial (
    const  char * name,
    char * buf,
    int buf_size
) 

function sm_virtual_queries

struct  parser_context * sm_virtual_queries (
    PARSER_CONTEXT * parser,
    DB_OBJECT * class_object
) 

Public Static Functions Documentation

function abort_subclasses

static void abort_subclasses (
    DB_OBJLIST * subclasses
) 

function add_candidate

static void add_candidate (
    SM_CANDIDATE ** candlist,
    SM_COMPONENT * comp,
    int order,
    MOP source,
    SM_RESOLUTION * resolutions
) 

function allocate_disk_structures

static int allocate_disk_structures (
    MOP classop,
    SM_CLASS * class_,
    DB_OBJLIST * subclasses,
    SM_TEMPLATE * template_
) 

function allocate_disk_structures_index

static int allocate_disk_structures_index (
    MOP classop,
    SM_CLASS * class_,
    SM_CLASS_CONSTRAINT * con,
    DB_OBJLIST * subclasses,
    SM_TEMPLATE * template_
) 

function allocate_foreign_key

static int allocate_foreign_key (
    MOP classop,
    SM_CLASS * class_,
    SM_CLASS_CONSTRAINT * con,
    DB_OBJLIST * subclasses
) 

function allocate_index

static int allocate_index (
    MOP classop,
    SM_CLASS * class_,
    DB_OBJLIST * subclasses,
    SM_CLASS_CONSTRAINT * con
) 

function allocate_unique_constraint

static int allocate_unique_constraint (
    MOP classop,
    SM_CLASS * class_,
    SM_CLASS_CONSTRAINT * con,
    DB_OBJLIST * subclasses,
    SM_TEMPLATE * template_
) 

function alter_trigger_cache

static int alter_trigger_cache (
    SM_CLASS * class_,
    const  char * attribute,
    int class_attribute,
    DB_OBJECT * trigger,
    int drop_it
) 

function alter_trigger_hierarchy

static int alter_trigger_hierarchy (
    DB_OBJECT * classop,
    const  char * attribute,
    int class_attribute,
    DB_OBJECT * target_class,
    DB_OBJECT * trigger,
    int drop_it
) 

function annotate_method_files

static int annotate_method_files (
    MOP classmop,
    SM_CLASS * class_
) 

function assign_attribute_id

static void assign_attribute_id (
    SM_CLASS * class_,
    SM_ATTRIBUTE * att,
    int class_attribute
) 

function assign_method_id

static void assign_method_id (
    SM_CLASS * class_,
    SM_METHOD * method,
    bool class_method
) 

function auto_resolve_conflict

static void auto_resolve_conflict (
    SM_CANDIDATE * candidate,
    SM_RESOLUTION ** resolutions,
    SM_NAME_SPACE resspace
) 

function build_storage_order

static int build_storage_order (
    SM_CLASS * class_,
    SM_TEMPLATE * flat
) 

function candidate_source_name

static const  char * candidate_source_name (
    SM_TEMPLATE * template_,
    SM_CANDIDATE * candidate
) 

function check_alias_conflict

static int check_alias_conflict (
    SM_TEMPLATE * template_,
    SM_CANDIDATE * candidates
) 

function check_alias_domains

static int check_alias_domains (
    SM_TEMPLATE * template_,
    SM_CANDIDATE * candidates,
    SM_CANDIDATE ** most_specific
) 

function check_attribute_method_overlap

static int check_attribute_method_overlap (
    SM_TEMPLATE * template_,
    SM_CANDIDATE * candidates
) 

function check_fk_validity

static int check_fk_validity (
    MOP classop,
    SM_CLASS * class_,
    SM_ATTRIBUTE ** key_attrs,
    const  int * asc_desc,
    OID * pk_cls_oid,
    BTID * pk_btid,
    char * fk_name
) 

function check_inherited_attributes

static void check_inherited_attributes (
    MOP classmop,
    SM_CLASS * class_,
    SM_TEMPLATE * flat
) 

function check_invalid_resolutions

static int check_invalid_resolutions (
    SM_TEMPLATE * template_,
    SM_RESOLUTION ** resolutions,
    SM_RESOLUTION * original_list
) 

function check_resolution_target

static int check_resolution_target (
    SM_TEMPLATE * template_,
    SM_RESOLUTION * res,
    int * valid_ptr
) 

function collect_hier_class_info

static int collect_hier_class_info (
    MOP classop,
    DB_OBJLIST * subclasses,
    const  char * constraint_name,
    int reverse,
    int * n_classes,
    int n_attrs,
    OID * oids,
    int * attr_ids,
    HFID * hfids
) 

function compare_argument_domains

static DOMAIN_COMP compare_argument_domains (
    SM_METHOD * m1,
    SM_METHOD * m2
) 

function compare_component_domains

static DOMAIN_COMP compare_component_domains (
    SM_COMPONENT * c1,
    SM_COMPONENT * c2
) 

function compare_domains

static DOMAIN_COMP compare_domains (
    TP_DOMAIN * d1,
    TP_DOMAIN * d2
) 

function construct_index_key_domain

static TP_DOMAIN * construct_index_key_domain (
    int n_atts,
    SM_ATTRIBUTE ** atts,
    const  int * asc_desc,
    const  int * prefix_lengths,
    int func_col_id,
    TP_DOMAIN * func_domain
) 

function deallocate_index

static int deallocate_index (
    SM_CLASS_CONSTRAINT * cons,
    BTID * index
) 

static int domain_search (
    MOP dclass_mop,
    MOP class_mop
) 

function drop_foreign_key_ref

static int drop_foreign_key_ref (
    MOP classop,
    SM_CLASS * class_,
    SM_CLASS_CONSTRAINT * flat_cons,
    SM_CLASS_CONSTRAINT ** cons
) 

function drop_foreign_key_ref_internal

static int drop_foreign_key_ref_internal (
    MOP classop,
    SM_CLASS_CONSTRAINT * flat_cons,
    SM_CLASS_CONSTRAINT * cons
) 

function fetch_descriptor_class

static int fetch_descriptor_class (
    MOP op,
    SM_DESCRIPTOR * desc,
    int for_update,
    SM_CLASS ** class_
) 

function filter_component_resolutions

static void filter_component_resolutions (
    SM_TEMPLATE * template_,
    const  char * name,
    SM_NAME_SPACE resspace
) 

function filter_local_constraints

static int filter_local_constraints (
    SM_TEMPLATE * template_,
    SM_CLASS * super_class
) 

function filter_reslist

static void filter_reslist (
    SM_RESOLUTION ** reslist,
    MOP deleted_class
) 

function filter_resolutions

static int filter_resolutions (
    SM_TEMPLATE * def,
    SM_TEMPLATE * flat,
    MOP deleted_class
) 

function find_argument

static SM_METHOD_ARGUMENT * find_argument (
    SM_METHOD_SIGNATURE * sig,
    int argnum
) 

function find_attribute_op

static int find_attribute_op (
    MOP op,
    const  char * name,
    SM_CLASS ** classp,
    SM_ATTRIBUTE ** attp
) 

function find_index_catalog

static MOP find_index_catalog (
    const  char * index_name
) 

function find_matching_att

static SM_ATTRIBUTE * find_matching_att (
    SM_ATTRIBUTE * list,
    SM_ATTRIBUTE * att,
    int idmatch
) 

function find_superclass

static int find_superclass (
    DB_OBJECT * classop,
    SM_TEMPLATE * temp,
    DB_OBJECT * super
) 

function fixup_attribute_self_domain

static void fixup_attribute_self_domain (
    SM_ATTRIBUTE * att,
    MOP self
) 

function fixup_component_classes

static void fixup_component_classes (
    MOP classop,
    SM_TEMPLATE * flat
) 

function fixup_method_self_domains

static void fixup_method_self_domains (
    SM_METHOD * meth,
    MOP self
) 

function fixup_self_domain

static void fixup_self_domain (
    TP_DOMAIN * domain,
    MOP self
) 

function fixup_self_reference_domains

static void fixup_self_reference_domains (
    MOP classop,
    SM_TEMPLATE * flat
) 

function flatten_components

static int flatten_components (
    SM_TEMPLATE * def,
    SM_TEMPLATE * flat,
    SM_NAME_SPACE name_space,
    int auto_res
) 

function flatten_method_files

static int flatten_method_files (
    SM_TEMPLATE * def,
    SM_TEMPLATE * flat
) 

function flatten_partition_info

static int flatten_partition_info (
    SM_TEMPLATE * def,
    SM_TEMPLATE * flat
) 

function flatten_properties

static int flatten_properties (
    SM_TEMPLATE * def,
    SM_TEMPLATE * flat
) 

function flatten_query_spec_lists

static int flatten_query_spec_lists (
    SM_TEMPLATE * def,
    SM_TEMPLATE * flat
) 

function flatten_subclasses

static int flatten_subclasses (
    DB_OBJLIST * subclasses,
    MOP deleted_class
) 

function flatten_template

static int flatten_template (
    SM_TEMPLATE * def,
    MOP deleted_class,
    SM_TEMPLATE ** flatp,
    int auto_res
) 

function flatten_trigger_cache

static int flatten_trigger_cache (
    SM_TEMPLATE * def,
    SM_TEMPLATE * flat
) 

function free_candidates

static void free_candidates (
    SM_CANDIDATE * candidates
) 

function get_candidates

static SM_CANDIDATE * get_candidates (
    SM_TEMPLATE * def,
    SM_TEMPLATE * flat,
    SM_NAME_SPACE name_space
) 

function inherit_constraint

static int inherit_constraint (
    MOP classop,
    SM_CLASS_CONSTRAINT * con
) 

function insert_attribute

static void insert_attribute (
    SM_ATTRIBUTE ** attlist,
    SM_ATTRIBUTE * att
) 

function insert_method

static void insert_method (
    SM_METHOD ** methlist,
    SM_METHOD * method
) 

function install_new_representation

static int install_new_representation (
    MOP classop,
    SM_CLASS * class_,
    SM_TEMPLATE * flat
) 

function invalidate_unused_triggers

static void invalidate_unused_triggers (
    MOP class_mop,
    SM_CLASS * class_,
    SM_TEMPLATE * flat
) 

function is_index_owner

static bool is_index_owner (
    MOP classop,
    SM_CLASS_CONSTRAINT * con
) 

function lock_query_subclasses

static int lock_query_subclasses (
    DB_OBJLIST ** subclasses,
    MOP op,
    DB_OBJLIST * exceptions,
    int update
) 

function lock_subclasses

static int lock_subclasses (
    SM_TEMPLATE * def,
    DB_OBJLIST * newsupers,
    DB_OBJLIST * cursubs,
    DB_OBJLIST ** newsubs
) 

function lock_subclasses_internal

static int lock_subclasses_internal (
    SM_TEMPLATE * def,
    MOP op,
    DB_OBJLIST * newsupers,
    DB_OBJLIST ** newsubs
) 

function lock_supers

static int lock_supers (
    SM_TEMPLATE * def,
    DB_OBJLIST * current,
    DB_OBJLIST ** oldlist,
    DB_OBJLIST ** newlist
) 

function lock_supers_drop

static int lock_supers_drop (
    DB_OBJLIST * supers
) 

function lockhint_subclasses

static int lockhint_subclasses (
    SM_TEMPLATE * temp,
    SM_CLASS * class_
) 

function make_candidate_from_component

static SM_CANDIDATE * make_candidate_from_component (
    SM_COMPONENT * comp,
    MOP source
) 

function make_component_from_candidate

static SM_COMPONENT * make_component_from_candidate (
    MOP classop,
    SM_CANDIDATE * cand
) 

function order_atts_by_alignment

static SM_ATTRIBUTE * order_atts_by_alignment (
    SM_ATTRIBUTE * atts
) 

function prune_candidate

static SM_CANDIDATE * prune_candidate (
    SM_CANDIDATE ** clist_pointer
) 

function rem_class_from_index

static int rem_class_from_index (
    OID * oid,
    BTID * index,
    HFID * heap
) 

function remove_class_triggers

static int remove_class_triggers (
    MOP classop,
    SM_CLASS * class_
) 

function remove_shadowed_resolutions

static void remove_shadowed_resolutions (
    SM_TEMPLATE * original,
    SM_TEMPLATE * flat
) 

function resolve_candidates

static int resolve_candidates (
    SM_TEMPLATE * template_,
    SM_CANDIDATE * candidates,
    int auto_resolve,
    SM_CANDIDATE ** winner_return
) 

function retain_former_ids

static int retain_former_ids (
    SM_TEMPLATE * flat
) 

function save_previous_value

static void save_previous_value (
    SM_ATTRIBUTE * old,
    SM_ATTRIBUTE * new_
) 

function sc_current_schema_name

static const  char * sc_current_schema_name (
    void
) 

function sm_add_secondary_index_on_partition

static int sm_add_secondary_index_on_partition (
    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,
    MOP * sub_partitions
) 

function sm_build_function_nlist

static int sm_build_function_nlist (
    METHOD_LINK * links,
    struct  nlist ** nlist_ptr
) 

function sm_constraint_belongs_to_class

static bool sm_constraint_belongs_to_class (
    const  SM_CLASS_CONSTRAINT * const con,
    MOP  const mop
) 

function sm_count_tokens

static int sm_count_tokens (
    const  char * string,
    int * maxcharp
) 

function sm_default_constraint_name

static char * sm_default_constraint_name (
    const  char * class_name,
    DB_CONSTRAINT_TYPE type,
    const  char ** att_names,
    const  int * asc_desc
) 

function sm_drop_cascade_foreign_key

static int sm_drop_cascade_foreign_key (
    SM_CLASS * class_
) 

static int sm_dynamic_link_class (
    SM_CLASS * class_,
    METHOD_LINK * links
) 

function sm_expand_method_files

static int sm_expand_method_files (
    SM_METHOD_FILE * files
) 

function sm_fetch_all_objects_internal

static DB_OBJLIST * sm_fetch_all_objects_internal (
    DB_OBJECT * op,
    DB_FETCH_MODE purpose,
    LC_FETCH_VERSION_TYPE * force_fetch_version_type
) 

function sm_file_extension

static int sm_file_extension (
    const  char * path,
    const  char * ext
) 

function sm_filter_index_pred_have_invalid_attrs

static bool sm_filter_index_pred_have_invalid_attrs (
    SM_CLASS_CONSTRAINT * constraint,
    char * class_name,
    SM_ATTRIBUTE * old_atts,
    SM_ATTRIBUTE * new_atts
) 

function sm_find_static_method

static STATIC_METHOD * sm_find_static_method (
    const  char * name
) 

function sm_flush_and_decache_objects_internal

static int sm_flush_and_decache_objects_internal (
    MOP obj,
    MOP obj_class_mop,
    int decache
) 

function sm_free_function_nlist

static void sm_free_function_nlist (
    struct  nlist * namelist
) 

function sm_free_loader_commands

static void sm_free_loader_commands (
    char ** commands
) 

static void sm_free_method_links (
    METHOD_LINK * links
) 

function sm_free_resident_classes_virtual_query_cache

static void sm_free_resident_classes_virtual_query_cache (
    void
) 

function sm_get_all_classes

static DB_OBJLIST * sm_get_all_classes (
    int external_list
) 

function sm_get_all_objects

static DB_OBJLIST * sm_get_all_objects (
    DB_OBJECT * op
) 

function sm_get_att_domain

static int sm_get_att_domain (
    MOP op,
    const  char * name,
    TP_DOMAIN ** domain
) 

function sm_get_base_classes

static DB_OBJLIST * sm_get_base_classes (
    int external_list
) 

function sm_get_class_name

static const  char * sm_get_class_name (
    MOP op
) 

function sm_get_class_name_internal

static const  char * sm_get_class_name_internal (
    MOP op,
    bool return_null
) 

function sm_get_class_name_not_null

static const  char * sm_get_class_name_not_null (
    MOP op
) 

function sm_get_set_domain

static TP_DOMAIN * sm_get_set_domain (
    MOP classop,
    int att_id
) 

function sm_has_constraint

static int sm_has_constraint (
    MOBJ classobj,
    SM_ATTRIBUTE_FLAG constraint
) 

function sm_is_nested_view_recached

static bool sm_is_nested_view_recached (
    PARSER_CONTEXT * parser
) 

static int sm_link_methods (
    SM_CLASS * class_
) 

static int sm_link_static_method (
    SM_METHOD * method,
    METHOD_LINK ** link_ptr
) 

static int sm_link_static_methods (
    SM_CLASS * class_,
    METHOD_LINK ** links_ptr
) 

function sm_load_online_index

static int sm_load_online_index (
    MOP classmop,
    const  char * constraint_name
) 

function sm_locate_method_file

static const  char * sm_locate_method_file (
    SM_CLASS * class_,
    const  char * function
) 

function sm_object_disk_size

static int sm_object_disk_size (
    MOP op
) 

function sm_print

static void sm_print (
    MOP classmop
) 

function sm_query_lock

static DB_OBJLIST * sm_query_lock (
    MOP classop,
    DB_OBJLIST * exceptions,
    int only,
    int update
) 

function sm_reset_descriptors

static void sm_reset_descriptors (
    MOP class_
) 

function sm_save_nested_view_versions

static int sm_save_nested_view_versions (
    PARSER_CONTEXT * parser,
    DB_OBJECT * class_object,
    SM_CLASS * class_
) 

function sm_split_loader_commands

static int sm_split_loader_commands (
    const  char * string,
    const  char *** command_ptr
) 

function sm_type_name

static const  char * sm_type_name (
    DB_TYPE id
) 

function sm_update_trigger_cache

static int sm_update_trigger_cache (
    DB_OBJECT * class_,
    const  char * attribute,
    int class_attribute,
    void * cache
) 

function template_classname

static const  char * template_classname (
    SM_TEMPLATE * template_
) 

function transfer_disk_structures

static int transfer_disk_structures (
    MOP classop,
    SM_CLASS * class_,
    SM_TEMPLATE * flat
) 

function update_class

static int update_class (
    SM_TEMPLATE * template_,
    MOP * classmop,
    int auto_res,
    DB_AUTH auth,
    bool needs_hierarchy_lock
) 

function update_fk_ref_partitioned_class

static int update_fk_ref_partitioned_class (
    SM_TEMPLATE * ctemplate,
    SM_FOREIGN_KEY_INFO * fk_info,
    const  BTID * btid,
    const  char * old_name,
    const  char * new_name
) 

function update_foreign_key_ref

static int update_foreign_key_ref (
    MOP ref_clsop,
    SM_FOREIGN_KEY_INFO * fk_info
) 

function update_subclasses

static int update_subclasses (
    DB_OBJLIST * subclasses
) 

function update_supers

static int update_supers (
    MOP classop,
    DB_OBJLIST * oldsupers,
    DB_OBJLIST * newsupers
) 

function update_supers_drop

static int update_supers_drop (
    MOP classop,
    DB_OBJLIST * supers
) 

Macro Definition Documentation

define MAX_ATTR_IN_AUTO_GEN_NAME

#define MAX_ATTR_IN_AUTO_GEN_NAME `30`

define SM_ADD_CONSTRAINT_SAVEPOINT_NAME

#define SM_ADD_CONSTRAINT_SAVEPOINT_NAME `"aDDcONSTRAINT"`

define SM_ADD_UNIQUE_CONSTRAINT_SAVEPOINT_NAME

#define SM_ADD_UNIQUE_CONSTRAINT_SAVEPOINT_NAME `"aDDuNIQUEcONSTRAINT"`

define SM_DROP_CLASS_MOP_SAVEPOINT_NAME

#define SM_DROP_CLASS_MOP_SAVEPOINT_NAME `"dELETEcLASSmOP"`

define SM_TRUNCATE_SAVEPOINT_NAME

#define SM_TRUNCATE_SAVEPOINT_NAME `"SmtRUnCATE"`

define WC_PERIOD

#define WC_PERIOD `L '.'`


The documentation for this class was generated from the following file cubrid/src/object/schema_manager.c