CUBRID Engine
latest
|
#include "language_support.h"
#include "storage_common.h"
#include "object_domain.h"
#include "work_space.h"
#include "class_object.h"
#include "schema_template.h"
#include "trigger_manager.h"
#include "tde.h"
Go to the source code of this file.
Classes | |
struct | sm_constraint_info |
Typedefs | |
typedef SM_CLASS | ROOT_CLASS |
typedef struct sm_constraint_info | SM_CONSTRAINT_INFO |
Variables | |
ROOT_CLASS | sm_Root_class |
const char | TEXT_CONSTRAINT_PREFIX [] |
MOP | sm_Root_class_mop |
HFID * | sm_Root_class_hfid |
const char * | sm_Root_class_name |
typedef SM_CLASS ROOT_CLASS |
Definition at line 57 of file schema_manager.h.
typedef struct sm_constraint_info SM_CONSTRAINT_INFO |
Definition at line 65 of file schema_manager.h.
Definition at line 1709 of file class_object.c.
References ARG_FILE_LINE, assert, classobj_decompose_property_oid(), classobj_get_prop(), classobj_put_prop(), db_get_set(), db_get_string(), db_make_null(), DB_TYPE_SEQUENCE, DB_TYPE_STRING, DB_VALUE_TYPE, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SM_INVALID_PROPERTY, err, vfid::fileid, i, NO_ERROR, NULL, pr_clear_value(), btid::root_pageid, set_drop_seq_element(), set_get_element(), set_get_element_nocopy(), set_put_element(), set_size(), SM_COMPARE_NAMES, SM_PROPERTY_PRIMARY_KEY, btid::vfid, and vfid::volid.
Referenced by drop_foreign_key_ref_internal(), and update_fk_ref_partitioned_class().
bool classobj_is_exist_foreign_key_ref | ( | MOP | refop, |
SM_FOREIGN_KEY_INFO * | fk_info | ||
) |
Definition at line 1281 of file class_object.c.
References au_fetch_class_force(), AU_FETCH_READ, BTID_IS_EQUAL, classobj_find_class_primary_key(), error(), sm_class_constraint::fk_info, sm_foreign_key_info::next, NO_ERROR, NULL, OID_EQ, btid::root_pageid, sm_foreign_key_info::self_btid, and sm_foreign_key_info::self_oid.
Referenced by allocate_foreign_key().
int classobj_put_foreign_key_ref | ( | DB_SEQ ** | properties, |
SM_FOREIGN_KEY_INFO * | fk_info | ||
) |
Definition at line 1381 of file class_object.c.
References ARG_FILE_LINE, assert, classobj_decompose_property_oid(), classobj_get_prop(), classobj_make_foreign_key_ref_seq(), classobj_put_prop(), db_get_set(), db_get_string(), db_make_sequence(), db_make_string(), DB_TYPE_SEQUENCE, DB_TYPE_STRING, DB_VALUE_TYPE, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), ER_SM_INVALID_PROPERTY, err, vfid::fileid, i, NO_ERROR, NULL, pr_clear_value(), PRIM_SET_NULL(), btid::root_pageid, set_create_sequence(), set_get_element(), set_get_element_nocopy(), set_put_element(), set_size(), SM_COMPARE_NAMES, SM_PROPERTY_PRIMARY_KEY, btid::vfid, and vfid::volid.
Referenced by allocate_foreign_key(), update_fk_ref_partitioned_class(), and update_foreign_key_ref().
int ib_get_thread_count | ( | ) |
Definition at line 15379 of file execute_schema.c.
References ib_thread_count.
Referenced by btree_load_index().
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 * | predicate_info, | ||
SM_FUNCTION_INFO * | fi_info, | ||
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().
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().
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().
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, | ||
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().
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().
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().
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().
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().
void sm_fee_resident_classes_virtual_query_cache | ( | void | ) |
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().
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().
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().
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_length_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().
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().
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().
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 | ||
) |
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().
SM_CLASS_TYPE sm_get_class_type | ( | SM_CLASS * | class_ | ) |
Definition at line 4083 of file schema_template.c.
References sm_class::class_type.
Referenced by db_is_class(), db_is_vclass(), is_vclass_object(), pt_check_show_index(), pt_check_table_in_show_heap(), pt_has_modified_class_helper(), sm_fetch_all_objects_internal(), and vid_getall_mops().
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 | ||
) |
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 * | class_, |
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().
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().
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().
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().
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().
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().
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 | onoff | ||
) |
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().
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().
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 | lock_hierarchy | ||
) |
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 | ( | struct 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().
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 |
Definition at line 259 of file schema_manager.c.
Referenced by locator_assign_permanent_oid(), and locator_mflush().
MOP sm_Root_class_mop |
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 |
Definition at line 256 of file schema_manager.c.
Referenced by sm_create_root().
const char TEXT_CONSTRAINT_PREFIX[] |