CUBRID Engine
latest
|
Go to the source code of this file.
Classes | |
struct | tr_trigger |
struct | tr_triglist |
struct | tr_deferred_context |
struct | tr_activity |
struct | tr_state |
struct | tr_schema_cache |
Macros | |
#define | TR_LOWEST_PRIORITY 0.0 |
#define | TR_MAX_RECURSION_LEVEL 32 |
#define | TR_MAX_PRINT_STRING 2048 |
#define | tr_free_schema_cache_and_init(cache) |
Typedefs | |
typedef struct tr_trigger | TR_TRIGGER |
typedef struct tr_triglist | TR_TRIGLIST |
typedef struct tr_deferred_context | TR_DEFERRED_CONTEXT |
typedef struct tr_activity | TR_ACTIVITY |
typedef struct tr_state | TR_STATE |
typedef struct tr_schema_cache | TR_SCHEMA_CACHE |
Enumerations | |
enum | TR_CACHE_TYPE { TR_CACHE_CLASS, TR_CACHE_ATTRIBUTE } |
enum | TR_RECURSION_DECISION { TR_DECISION_CONTINUE, TR_DECISION_HALT_WITH_ERROR, TR_DECISION_DO_NOT_CONTINUE } |
Variables | |
const char * | TR_CLASS_NAME |
const char * | TR_ATT_NAME |
const char * | TR_ATT_OWNER |
const char * | TR_ATT_EVENT |
const char * | TR_ATT_STATUS |
const char * | TR_ATT_PRIORITY |
const char * | TR_ATT_CLASS |
const char * | TR_ATT_ATTRIBUTE |
const char * | TR_ATT_CLASS_ATTRIBUTE |
const char * | TR_ATT_CONDITION_TYPE |
const char * | TR_ATT_CONDITION_TIME |
const char * | TR_ATT_CONDITION |
const char * | TR_ATT_ACTION_TYPE |
const char * | TR_ATT_ACTION_TIME |
const char * | TR_ATT_ACTION |
const char * | TR_ATT_ACTION_OLD |
const char * | TR_ATT_PROPERTIES |
const char * | TR_ATT_COMMENT |
int | tr_Current_depth |
int | tr_Maximum_depth |
bool | tr_Invalid_transaction |
char | tr_Invalid_transaction_trigger [SM_MAX_IDENTIFIER_LENGTH+2] |
bool | tr_Trace |
TR_DEFERRED_CONTEXT * | tr_Deferred_activities |
TR_DEFERRED_CONTEXT * | tr_Deferred_activities_tail |
int | tr_Recursion_level |
int | tr_Recursion_level_max |
TR_TRIGLIST * | tr_Deferred_triggers |
TR_TRIGLIST * | tr_Deferred_triggers_tail |
#define tr_free_schema_cache_and_init | ( | cache | ) |
Definition at line 63 of file trigger_manager.h.
Referenced by classobj_free_class().
#define TR_LOWEST_PRIORITY 0.0 |
Definition at line 40 of file trigger_manager.h.
Referenced by define_trigger_classes(), do_alter_trigger(), do_create_trigger(), get_priority(), object_to_trigger(), tr_make_trigger(), and tr_trigger_priority().
#define TR_MAX_PRINT_STRING 2048 |
Definition at line 60 of file trigger_manager.h.
Referenced by tr_trigger_action().
#define TR_MAX_RECURSION_LEVEL 32 |
Definition at line 50 of file trigger_manager.h.
Referenced by eval_action(), tr_check_recursivity(), tr_init(), and tr_set_depth().
typedef struct tr_activity TR_ACTIVITY |
Definition at line 129 of file trigger_manager.h.
typedef struct tr_deferred_context TR_DEFERRED_CONTEXT |
typedef struct tr_schema_cache TR_SCHEMA_CACHE |
typedef struct tr_trigger TR_TRIGGER |
typedef struct tr_triglist TR_TRIGLIST |
enum TR_CACHE_TYPE |
Enumerator | |
---|---|
TR_CACHE_CLASS | |
TR_CACHE_ATTRIBUTE |
Definition at line 176 of file trigger_manager.h.
Enumerator | |
---|---|
TR_DECISION_CONTINUE | |
TR_DECISION_HALT_WITH_ERROR | |
TR_DECISION_DO_NOT_CONTINUE |
Definition at line 191 of file trigger_manager.h.
void tr_abort | ( | TR_STATE * | state | ) |
Definition at line 5536 of file trigger_manager.c.
References tr_finish().
Referenced by check_merge_trigger(), check_trigger(), obt_apply_assignments(), tr_after_object(), and tr_before_object().
int tr_active_schema_cache | ( | MOP | class_mop, |
TR_SCHEMA_CACHE * | cache, | ||
DB_TRIGGER_EVENT | event_type, | ||
bool * | has_event_type_triggers | ||
) |
Definition at line 2787 of file trigger_manager.c.
References tr_schema_cache::array_length, tr_trigger::event, i, tr_triglist::next, NULL, tr_trigger::status, TR_EVENT_ALL, TR_STATUS_ACTIVE, tr_validate_schema_cache(), tr_triglist::trigger, and tr_schema_cache::triggers.
Referenced by sm_active_triggers().
int tr_add_cache_trigger | ( | TR_SCHEMA_CACHE * | cache, |
DB_OBJECT * | trigger_object | ||
) |
Definition at line 2477 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, tr_schema_cache::compiled, error(), tr_trigger::event, insert_trigger_list(), ml_add(), NO_ERROR, NULL, tr_schema_cache::objects, tr_map_trigger(), and tr_schema_cache::triggers.
Referenced by alter_trigger_cache().
int tr_after | ( | TR_STATE * | state | ) |
Definition at line 5651 of file trigger_manager.c.
References NULL, and tr_after_object().
Referenced by check_merge_trigger(), and check_trigger().
Definition at line 5608 of file trigger_manager.c.
References add_deferred_activities(), error(), NO_ERROR, NULL, tr_abort(), tr_execute_activities(), TR_EXECUTION_ENABLED, tr_finish(), TR_TIME_AFTER, and tr_state::triggers.
Referenced by obj_delete(), obt_apply_assignments(), and tr_after().
int tr_before | ( | TR_STATE * | state | ) |
Definition at line 5593 of file trigger_manager.c.
References NULL, and tr_before_object().
Referenced by check_merge_trigger(), and check_trigger().
Definition at line 5561 of file trigger_manager.c.
References error(), NO_ERROR, tr_abort(), tr_execute_activities(), TR_EXECUTION_ENABLED, and TR_TIME_BEFORE.
Referenced by obj_delete(), obt_apply_assignments(), and tr_before().
void tr_check_abort_triggers | ( | void | ) |
Definition at line 5865 of file trigger_manager.c.
References flush_deferred_activities(), run_user_triggers(), TR_EVENT_ABORT, TR_EXECUTION_ENABLED, tr_Invalid_transaction, and TR_TIME_AFTER.
Referenced by tran_abort_only_client(), and tran_unilaterally_abort().
int tr_check_authorization | ( | DB_OBJECT * | trigger_object, |
int | alter_flag | ||
) |
Definition at line 4302 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, check_authorization(), error(), NO_ERROR, NULL, and tr_map_trigger().
Referenced by do_alter_trigger(), and do_drop_trigger().
int tr_check_commit_triggers | ( | DB_TRIGGER_TIME | time | ) |
Definition at line 5715 of file trigger_manager.c.
References ARG_FILE_LINE, ASSERT_ERROR_AND_SET, ER_ERROR_SEVERITY, er_set(), ER_TR_TRANSACTION_INVALIDATED, error(), NO_ERROR, NULL, run_user_triggers(), TR_EVENT_COMMIT, tr_execute_deferred_activities(), TR_EXECUTION_ENABLED, tr_free_trigger_list(), tr_Invalid_transaction, tr_Invalid_transaction_trigger, TR_TIME_BEFORE, and tr_User_triggers_modified.
Referenced by tran_commit().
void tr_check_rollback_triggers | ( | DB_TRIGGER_TIME | time | ) |
Definition at line 5782 of file trigger_manager.c.
References flush_deferred_activities(), tr_triglist::next, NULL, run_user_triggers(), tr_drop_trigger_internal(), TR_EVENT_ROLLBACK, TR_EVENT_TIMEOUT, TR_EXECUTION_ENABLED, tr_free_trigger_list(), tr_Invalid_transaction, TR_TIME_AFTER, tr_User_triggers_modified, tr_User_triggers_valid, and tr_triglist::trigger.
Referenced by tran_abort().
TR_SCHEMA_CACHE* tr_copy_schema_cache | ( | TR_SCHEMA_CACHE * | cache, |
MOP | filter_class | ||
) |
Definition at line 2308 of file trigger_manager.c.
References tr_schema_cache::array_length, tr_trigger::class_mop, ml_add(), ml_copy(), db_objlist::next, NULL, tr_schema_cache::objects, db_objlist::op, TR_CACHE_ATTRIBUTE, TR_CACHE_CLASS, tr_free_schema_cache(), tr_make_schema_cache(), tr_map_trigger(), and TR_MAX_CLASS_TRIGGERS.
Referenced by classobj_init_attribute(), classobj_make_template(), and flatten_trigger_cache().
DB_OBJECT* tr_create_trigger | ( | const char * | name, |
DB_TRIGGER_STATUS | status, | ||
double | priority, | ||
DB_TRIGGER_EVENT | event, | ||
DB_OBJECT * | class_, | ||
const char * | attribute, | ||
DB_TRIGGER_TIME | cond_time, | ||
const char * | cond_source, | ||
DB_TRIGGER_TIME | action_time, | ||
DB_TRIGGER_ACTION | action_type, | ||
const char * | action_source, | ||
const char * | comment | ||
) |
Definition at line 3916 of file trigger_manager.c.
References tr_trigger::action, ARG_FILE_LINE, tr_trigger::attribute, Au_user, check_semantics(), tr_trigger::class_mop, tr_trigger::comment, compile_trigger_activity(), tr_trigger::condition, db_get_class_name(), db_is_vclass(), er_errid(), ER_ERROR_SEVERITY, ER_LK_UNILATERALLY_ABORTED, er_set(), ER_TR_MISSING_ACTION_STRING, ER_TR_NO_VCLASSES, error(), tr_trigger::event, free_trigger(), insert_trigger_list(), locator_all_flush(), make_activity(), mht_put(), mht_rem(), tr_trigger::name, NO_ERROR, NULL, tr_trigger::object, tr_trigger::owner, tr_trigger::priority, register_user_trigger(), remove_trigger_list(), sm_add_trigger(), sm_downcase_name(), SM_MAX_IDENTIFIER_LENGTH, tr_activity::source, tr_trigger::status, strdup(), tr_activity::time, TM_TRAN_ISOLATION, TR_ACT_EXPRESSION, TR_ACT_NULL, tr_drop_deferred_activities(), tr_make_trigger(), tr_process_name(), TR_TIME_AFTER, TR_TIME_NULL, tran_abort_upto_system_savepoint(), TRAN_REP_READ, tran_system_savepoint(), trigger_table_add(), trigger_table_drop(), trigger_to_object(), tr_activity::type, and UNIQUE_SAVEPOINT_CREATE_TRIGGER.
Referenced by db_create_trigger(), and do_create_trigger().
int tr_delete_schema_cache | ( | TR_SCHEMA_CACHE * | cache, |
DB_OBJECT * | class_object | ||
) |
Definition at line 2841 of file trigger_manager.c.
References AU_DISABLE, AU_ENABLE, tr_trigger::class_mop, db_make_int(), db_put_internal(), db_objlist::next, NO_ERROR, NULL, tr_schema_cache::objects, db_objlist::op, tr_trigger::status, TR_ATT_STATUS, tr_free_schema_cache(), tr_map_trigger(), and TR_STATUS_INVALID.
Referenced by invalidate_unused_triggers().
int tr_delete_triggers_for_class | ( | TR_SCHEMA_CACHE ** | cache, |
DB_OBJECT * | class_object | ||
) |
Definition at line 2914 of file trigger_manager.c.
References AU_DISABLE, AU_ENABLE, tr_trigger::class_mop, error(), db_objlist::next, NO_ERROR, NULL, db_objlist::op, tr_drop_trigger_internal(), tr_free_schema_cache(), tr_map_trigger(), and tr_validate_schema_cache().
Referenced by remove_class_triggers().
int tr_drop_cache_trigger | ( | TR_SCHEMA_CACHE * | cache, |
DB_OBJECT * | trigger_object | ||
) |
Definition at line 2519 of file trigger_manager.c.
References assert, tr_schema_cache::compiled, er_errid(), error(), tr_trigger::event, ml_remove(), NO_ERROR, NULL, tr_schema_cache::objects, remove_trigger_list(), tr_map_trigger(), and tr_schema_cache::triggers.
Referenced by alter_trigger_cache().
Definition at line 6055 of file trigger_manager.c.
References ARG_FILE_LINE, Au_dba_user, Au_user, ER_ERROR_SEVERITY, er_set(), ER_TR_ACTIVITY_NOT_OWNED, error(), tr_deferred_context::head, tr_triglist::next, tr_deferred_context::next, NO_ERROR, NULL, tr_trigger::object, tr_trigger::owner, remove_deferred_activity(), remove_deferred_context(), tr_triglist::target, tr_triglist::trigger, and ws_is_same_object().
Referenced by db_drop_deferred_activities(), do_remove_trigger(), tr_create_trigger(), and tr_drop_trigger().
Definition at line 4442 of file trigger_manager.c.
References tr_trigger::action, ARG_FILE_LINE, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, check_authorization(), tr_trigger::condition, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_TR_TRIGGER_DELETE_FAILURE, error(), free_and_init, tr_trigger::name, NO_ERROR, NULL, strdup(), tr_activity::time, TM_TRAN_ISOLATION, tr_drop_deferred_activities(), tr_drop_trigger_internal(), tr_map_trigger(), TR_TIME_DEFERRED, and TRAN_REP_READ.
Referenced by db_drop_trigger(), and do_drop_trigger().
void tr_dump | ( | FILE * | fpp | ) |
Definition at line 7240 of file trigger_manager.c.
References tr_deferred_context::head, tr_trigger::name, tr_triglist::next, tr_deferred_context::next, NULL, TR_EXECUTION_ENABLED, and tr_triglist::trigger.
Referenced by help_print_info().
int tr_empty_schema_cache | ( | TR_SCHEMA_CACHE * | cache | ) |
Definition at line 2405 of file trigger_manager.c.
References NULL, and tr_schema_cache::objects.
Referenced by flatten_trigger_cache().
const char* tr_event_as_string | ( | DB_TRIGGER_EVENT | event | ) |
Definition at line 6611 of file trigger_manager.c.
References TR_EVENT_ABORT, TR_EVENT_ALL, TR_EVENT_ALTER, TR_EVENT_COMMIT, TR_EVENT_DELETE, TR_EVENT_DROP, TR_EVENT_INSERT, TR_EVENT_NULL, TR_EVENT_ROLLBACK, TR_EVENT_STATEMENT_DELETE, TR_EVENT_STATEMENT_INSERT, TR_EVENT_STATEMENT_UPDATE, TR_EVENT_TIMEOUT, and TR_EVENT_UPDATE.
Referenced by object_printer::describe_class_trigger(), trigger_description::init(), and tr_dump_trigger().
Definition at line 5957 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, error(), execute_activity(), tr_deferred_context::head, its_deleted(), tr_trigger::name, tr_triglist::next, tr_deferred_context::next, NO_ERROR, NULL, tr_trigger::object, remove_deferred_activity(), remove_deferred_context(), start_state(), tr_triglist::target, TR_EXECUTION_ENABLED, tr_finish(), TR_RETURN_ERROR, TR_RETURN_TRUE, TR_TIME_DEFERRED, and tr_triglist::trigger.
Referenced by db_execute_deferred_activities(), do_execute_trigger(), and tr_check_commit_triggers().
void tr_final | ( | void | ) |
Definition at line 7206 of file trigger_manager.c.
References flush_deferred_activities(), map_flush_helper(), mht_destroy(), mht_map(), NULL, and tr_free_trigger_list().
Referenced by boot_client_all_finalize(), boot_initialize_client(), boot_restart_client(), and ws_final().
int tr_find_all_triggers | ( | DB_OBJLIST ** | list | ) |
Definition at line 4186 of file trigger_manager.c.
References AU_DISABLE, AU_ENABLE, error(), and find_all_triggers().
Referenced by convert_speclist_to_objlist(), db_find_all_triggers(), and help_trigger_names().
int tr_find_event_triggers | ( | DB_TRIGGER_EVENT | event, |
DB_OBJECT * | class_, | ||
const char * | attribute, | ||
bool | active, | ||
DB_OBJLIST ** | list | ||
) |
Definition at line 4264 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, check_target(), error(), find_event_triggers(), and NO_ERROR.
Referenced by convert_speclist_to_objlist(), and db_find_event_triggers().
Definition at line 4216 of file trigger_manager.c.
References ARG_FILE_LINE, AU_DISABLE, AU_ENABLE, check_authorization(), ER_ERROR_SEVERITY, er_set(), ER_TR_TRIGGER_NOT_FOUND, ER_TR_TRIGGER_SELECT_FAILURE, NO_ERROR, NULL, tr_map_trigger(), and trigger_table_find().
Referenced by au_change_trigger_owner_method(), convert_speclist_to_objlist(), db_find_trigger(), do_rename_trigger(), and trigger_description::init().
void tr_free_schema_cache | ( | TR_SCHEMA_CACHE * | cache | ) |
Definition at line 2419 of file trigger_manager.c.
References tr_schema_cache::array_length, db_ws_free(), i, ml_free(), tr_schema_cache::next, NULL, tr_schema_cache::objects, tr_free_trigger_list(), and tr_schema_cache::triggers.
Referenced by classobj_clear_attribute(), classobj_free_template(), classobj_install_template(), flatten_trigger_cache(), tr_copy_schema_cache(), tr_delete_schema_cache(), and tr_delete_triggers_for_class().
void tr_free_trigger_list | ( | TR_TRIGLIST * | list | ) |
Definition at line 494 of file trigger_manager.c.
References db_ws_free(), tr_triglist::next, and NULL.
Referenced by flush_deferred_activities(), free_state(), remove_deferred_context(), remove_trigger_list_element(), tr_check_commit_triggers(), tr_check_rollback_triggers(), tr_final(), tr_free_schema_cache(), tr_prepare_statement(), tr_update_user_cache(), and tr_validate_schema_cache().
int tr_get_cache_objects | ( | TR_SCHEMA_CACHE * | cache, |
DB_OBJLIST ** | list | ||
) |
Definition at line 2562 of file trigger_manager.c.
References tr_schema_cache::array_length, error(), i, ml_add(), tr_triglist::next, NO_ERROR, NULL, tr_trigger::object, tr_schema_cache::objects, tr_triglist::trigger, and tr_schema_cache::triggers.
Referenced by attribute_size(), attribute_to_disk(), put_class_attributes(), put_class_varinfo(), and tf_class_size().
const char* tr_get_class_name | ( | void | ) |
Definition at line 7440 of file trigger_manager.c.
References DB_FETCH_QUERY_WRITE, db_get_string(), DB_IS_NULL, ER_FAILED, ml_ext_free(), db_objlist::next, NO_ERROR, NULL, obj_get(), obj_set(), db_objlist::op, sm_downcase_name(), sm_fetch_all_objects(), sm_find_class(), SM_MAX_IDENTIFIER_LENGTH, TR_CLASS_NAME, and ws_dirty().
int tr_get_depth | ( | void | ) |
Definition at line 7106 of file trigger_manager.c.
References tr_Maximum_depth.
Referenced by do_get_trigger().
bool tr_get_execution_state | ( | void | ) |
Definition at line 7416 of file trigger_manager.c.
References tr_Execution_enabled.
Referenced by check_merge_trigger(), check_trigger(), do_run_update_query_for_class(), and sm_active_triggers().
int tr_get_trace | ( | void | ) |
Definition at line 7138 of file trigger_manager.c.
References tr_Trace.
Referenced by do_get_trigger().
int tr_has_user_trigger | ( | bool * | has_user_trigger | ) |
Definition at line 5662 of file trigger_manager.c.
References assert, ASSERT_ERROR_AND_SET, error(), tr_triglist::next, NO_ERROR, NULL, tr_trigger::status, TR_EXECUTION_ENABLED, TR_STATUS_ACTIVE, tr_update_user_cache(), tr_User_triggers_valid, and tr_triglist::trigger.
Referenced by db_set_statement_auto_commit().
void tr_init | ( | void | ) |
Definition at line 7163 of file trigger_manager.c.
References mht_compare_ptrs_are_equal(), mht_create(), mht_ptrhash(), NULL, tr_Current_depth, TR_EST_MAP_SIZE, tr_Invalid_transaction, tr_Invalid_transaction_trigger, TR_MAX_RECURSION_LEVEL, tr_Maximum_depth, tr_Trace, tr_User_triggers_modified, and tr_User_triggers_valid.
Referenced by boot_initialize_client(), and boot_restart_client().
int tr_install | ( | void | ) |
Definition at line 7406 of file trigger_manager.c.
References define_trigger_classes().
Referenced by boot_initialize_client().
void tr_invalidate_user_cache | ( | void | ) |
int tr_is_trigger | ( | DB_OBJECT * | trigger_object, |
int * | status | ||
) |
Definition at line 6555 of file trigger_manager.c.
References error(), NO_ERROR, sm_find_class(), sm_get_class(), and TR_CLASS_NAME.
Referenced by help_print_obj().
TR_SCHEMA_CACHE* tr_make_schema_cache | ( | TR_CACHE_TYPE | type, |
DB_OBJLIST * | objects | ||
) |
Definition at line 2258 of file trigger_manager.c.
References tr_schema_cache::array_length, tr_schema_cache::compiled, db_ws_alloc(), i, tr_schema_cache::next, NULL, tr_schema_cache::objects, TR_CACHE_CLASS, TR_MAX_ATTRIBUTE_TRIGGERS, TR_MAX_CLASS_TRIGGERS, tr_Schema_caches, and tr_schema_cache::triggers.
Referenced by alter_trigger_cache(), disk_to_attribute(), disk_to_class(), flatten_trigger_cache(), and tr_copy_schema_cache().
TR_TRIGGER* tr_map_trigger | ( | DB_OBJECT * | object, |
int | fetch | ||
) |
Definition at line 1829 of file trigger_manager.c.
References free_trigger(), mht_get(), mht_put(), NO_ERROR, NULL, object_to_trigger(), tr_make_trigger(), and validate_trigger().
Referenced by do_alter_trigger(), find_all_triggers(), get_user_trigger_objects(), trigger_description::init(), sch_trigger(), tr_add_cache_trigger(), tr_check_authorization(), tr_copy_schema_cache(), tr_delete_schema_cache(), tr_delete_triggers_for_class(), tr_drop_cache_trigger(), tr_drop_trigger(), tr_dump_selective_triggers(), tr_dump_trigger(), tr_find_trigger(), tr_rename_trigger(), tr_set_comment(), tr_set_priority(), tr_set_status(), tr_status_as_string(), tr_trigger_action(), tr_trigger_action_time(), tr_trigger_action_type(), tr_trigger_attribute(), tr_trigger_class(), tr_trigger_comment(), tr_trigger_condition(), tr_trigger_condition_time(), tr_trigger_event(), tr_trigger_name(), tr_trigger_priority(), tr_trigger_status(), tr_update_user_cache(), and tr_validate_schema_cache().
int tr_merge_schema_cache | ( | TR_SCHEMA_CACHE * | destination, |
TR_SCHEMA_CACHE * | source | ||
) |
Definition at line 2382 of file trigger_manager.c.
References error(), ml_add(), db_objlist::next, NO_ERROR, NULL, tr_schema_cache::objects, and db_objlist::op.
Referenced by flatten_trigger_cache().
int tr_prepare_class | ( | TR_STATE ** | state_p, |
TR_SCHEMA_CACHE * | cache, | ||
MOP | class_Mop, | ||
DB_TRIGGER_EVENT | event | ||
) |
Definition at line 5452 of file trigger_manager.c.
References assert, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, er_errid(), error(), merge_trigger_list(), tr_trigger::name, NO_ERROR, NULL, start_state(), TR_EXECUTION_ENABLED, tr_validate_schema_cache(), tr_triglist::trigger, tr_state::triggers, and tr_schema_cache::triggers.
Referenced by obj_delete(), and obt_apply_assignments().
int tr_prepare_statement | ( | TR_STATE ** | state_p, |
DB_TRIGGER_EVENT | event, | ||
DB_OBJECT * | class_, | ||
int | attcount, | ||
const char ** | attnames | ||
) |
Definition at line 5267 of file trigger_manager.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_QPROC_INVALID_XASLNODE, er_set(), error(), i, merge_trigger_list(), tr_trigger::name, NO_ERROR, NULL, sm_get_trigger_cache(), start_state(), tr_free_trigger_list(), tr_validate_schema_cache(), tr_triglist::trigger, tr_state::triggers, and tr_schema_cache::triggers.
Referenced by check_merge_trigger(), and check_trigger().
Definition at line 6780 of file trigger_manager.c.
References ARG_FILE_LINE, ASSERT_ERROR, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, check_authorization(), db_make_string(), db_put_internal(), ER_ERROR_SEVERITY, ER_LK_UNILATERALLY_ABORTED, er_set(), ER_TR_TRIGGER_ALTER_FAILURE, error(), free_and_init, locator_flush_instance(), tr_trigger::name, NO_ERROR, NULL, strdup(), TM_TRAN_ISOLATION, TR_ATT_NAME, tr_map_trigger(), tr_process_name(), tran_abort_upto_system_savepoint(), TRAN_REP_READ, tran_system_savepoint(), trigger_table_rename(), and UNIQUE_SAVEPOINT_RENAME_TRIGGER.
Referenced by db_rename_trigger(), and do_rename_trigger().
Definition at line 7038 of file trigger_manager.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, check_authorization(), tr_trigger::comment, db_make_string_copy(), db_put_internal(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), ER_TR_TRIGGER_ALTER_FAILURE, error(), free_and_init, tr_trigger::name, NO_ERROR, NULL, pr_clear_value(), strdup(), TR_ATT_COMMENT, and tr_map_trigger().
Referenced by do_alter_trigger().
int tr_set_depth | ( | int | depth | ) |
Definition at line 7117 of file trigger_manager.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, er_set(), ER_TR_MAX_DEPTH_TOO_BIG, NO_ERROR, TR_MAX_RECURSION_LEVEL, and tr_Maximum_depth.
Referenced by do_set_trigger().
Definition at line 7430 of file trigger_manager.c.
References tr_Execution_enabled.
Referenced by db_disable_trigger(), db_enable_trigger(), do_run_update_query_for_class(), and sm_truncate_using_delete().
Definition at line 6969 of file trigger_manager.c.
References ARG_FILE_LINE, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, check_authorization(), tr_trigger::class_mop, db_make_double(), db_put_internal(), ER_ERROR_SEVERITY, er_set(), ER_TR_TRIGGER_ALTER_FAILURE, error(), tr_trigger::name, NO_ERROR, NULL, tr_trigger::priority, reorder_schema_caches(), TR_ATT_PRIORITY, tr_map_trigger(), and tr_update_user_cache().
Referenced by db_alter_trigger_priority(), and do_alter_trigger().
int tr_set_status | ( | DB_OBJECT * | trigger_object, |
DB_TRIGGER_STATUS | status, | ||
bool | call_from_api | ||
) |
Definition at line 6902 of file trigger_manager.c.
References ARG_FILE_LINE, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, check_authorization(), tr_trigger::class_mop, db_make_int(), db_put_internal(), ER_ERROR_SEVERITY, er_set(), ER_TR_TRIGGER_ALTER_FAILURE, error(), tr_trigger::name, NO_ERROR, NULL, sm_invalidate_trigger_cache(), tr_trigger::status, TR_ATT_STATUS, and tr_map_trigger().
Referenced by db_alter_trigger_status(), and do_alter_trigger().
int tr_set_trace | ( | bool | trace | ) |
Definition at line 7149 of file trigger_manager.c.
References NO_ERROR, and tr_Trace.
Referenced by do_set_trigger().
const char* tr_status_as_string | ( | DB_TRIGGER_STATUS | status | ) |
Definition at line 6668 of file trigger_manager.c.
References assert, Au_root, tr_trigger::class_mop, db_get_object(), db_get_set(), DB_IS_NULL, DB_TYPE_OBJECT, DB_VALUE_TYPE, er_errid(), error(), get_user_name(), i, max, tr_trigger::name, NO_ERROR, NULL, obj_get(), tr_trigger::owner, set_filter(), set_free(), set_get_element(), set_size(), sm_is_system_class(), tr_trigger::status, tr_dump_trigger(), tr_map_trigger(), TR_STATUS_ACTIVE, TR_STATUS_INACTIVE, and TR_STATUS_INVALID.
Referenced by trigger_description::init(), and tr_dump_trigger().
const char* tr_time_as_string | ( | DB_TRIGGER_TIME | time | ) |
Definition at line 6583 of file trigger_manager.c.
References TR_TIME_AFTER, TR_TIME_BEFORE, and TR_TIME_DEFERRED.
Referenced by object_printer::describe_trigger_action_time(), object_printer::describe_trigger_condition_time(), and tr_dump_trigger().
int tr_trigger_action | ( | DB_OBJECT * | trigger_object, |
char ** | action | ||
) |
Definition at line 6393 of file trigger_manager.c.
References tr_trigger::action, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, error(), NO_ERROR, NULL, tr_activity::source, TR_ACT_EXPRESSION, TR_ACT_INVALIDATE, TR_ACT_NULL, TR_ACT_PRINT, TR_ACT_REJECT, tr_map_trigger(), TR_MAX_PRINT_STRING, tr_activity::type, and ws_copy_string().
Referenced by db_trigger_action().
int tr_trigger_action_time | ( | DB_OBJECT * | trigger_object, |
DB_TRIGGER_TIME * | tr_time | ||
) |
Definition at line 6456 of file trigger_manager.c.
References tr_trigger::action, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, error(), NO_ERROR, NULL, tr_activity::time, tr_map_trigger(), and TR_TIME_NULL.
Referenced by db_trigger_action_time().
int tr_trigger_action_type | ( | DB_OBJECT * | trigger_object, |
DB_TRIGGER_ACTION * | type | ||
) |
Definition at line 6490 of file trigger_manager.c.
References tr_trigger::action, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, error(), NO_ERROR, NULL, TR_ACT_NULL, tr_map_trigger(), and tr_activity::type.
Referenced by db_trigger_action_type().
int tr_trigger_attribute | ( | DB_OBJECT * | trigger_object, |
char ** | attribute | ||
) |
Definition at line 6286 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, tr_trigger::attribute, AU_DISABLE, AU_ENABLE, error(), NO_ERROR, NULL, tr_map_trigger(), and ws_copy_string().
Referenced by db_trigger_attribute().
Definition at line 6250 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, tr_trigger::class_mop, error(), NO_ERROR, NULL, and tr_map_trigger().
Referenced by db_trigger_class().
int tr_trigger_comment | ( | DB_OBJECT * | trigger_objet, |
char ** | comment | ||
) |
Definition at line 6525 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, tr_trigger::comment, error(), NO_ERROR, NULL, tr_map_trigger(), and ws_copy_string().
Referenced by db_trigger_comment().
int tr_trigger_condition | ( | DB_OBJECT * | trigger_object, |
char ** | condition | ||
) |
Definition at line 6322 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, tr_trigger::condition, error(), NO_ERROR, NULL, tr_activity::source, TR_ACT_EXPRESSION, tr_map_trigger(), tr_activity::type, and ws_copy_string().
Referenced by db_trigger_condition().
int tr_trigger_condition_time | ( | DB_OBJECT * | trigger_object, |
DB_TRIGGER_TIME * | tr_time | ||
) |
Definition at line 6358 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, tr_trigger::condition, error(), NO_ERROR, NULL, tr_activity::time, tr_map_trigger(), and TR_TIME_NULL.
Referenced by db_trigger_condition_time().
int tr_trigger_event | ( | DB_OBJECT * | trigger_object, |
DB_TRIGGER_EVENT * | event | ||
) |
Definition at line 6214 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, error(), tr_trigger::event, NO_ERROR, NULL, TR_EVENT_NULL, and tr_map_trigger().
Referenced by db_trigger_event(), and get_user_trigger_objects().
int tr_trigger_name | ( | DB_OBJECT * | trigger_object, |
char ** | name | ||
) |
Definition at line 6109 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, error(), tr_trigger::name, NO_ERROR, NULL, tr_map_trigger(), and ws_copy_string().
Referenced by db_trigger_name(), and help_trigger_names().
int tr_trigger_priority | ( | DB_OBJECT * | trigger_object, |
double * | priority | ||
) |
Definition at line 6179 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, error(), NO_ERROR, NULL, tr_trigger::priority, TR_LOWEST_PRIORITY, and tr_map_trigger().
Referenced by db_trigger_priority().
int tr_trigger_status | ( | DB_OBJECT * | trigger_object, |
DB_TRIGGER_STATUS * | status | ||
) |
Definition at line 6144 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, error(), NO_ERROR, NULL, tr_trigger::status, tr_map_trigger(), and TR_STATUS_INACTIVE.
Referenced by db_trigger_status().
int tr_unmap_trigger | ( | TR_TRIGGER * | trigger | ) |
Definition at line 1879 of file trigger_manager.c.
References ASSERT_ERROR_AND_SET, error(), mht_rem(), NO_ERROR, NULL, and tr_trigger::object.
Referenced by tr_drop_trigger_internal().
int tr_update_user_cache | ( | void | ) |
Definition at line 2146 of file trigger_manager.c.
References assert, Au_user, db_get_object(), db_get_set(), DB_IS_NULL, DB_TYPE_OBJECT, DB_VALUE_TYPE, er_errid(), error(), i, insert_trigger_list(), max, NO_ERROR, NULL, obj_get(), set_filter(), set_free(), set_get_element(), set_size(), tr_free_trigger_list(), tr_invalidate_user_cache(), tr_map_trigger(), and tr_User_triggers_valid.
Referenced by register_user_trigger(), run_user_triggers(), tr_has_user_trigger(), tr_set_priority(), and unregister_user_trigger().
int tr_validate_schema_cache | ( | TR_SCHEMA_CACHE * | cache, |
MOP | class_mop | ||
) |
Definition at line 2602 of file trigger_manager.c.
References tr_schema_cache::array_length, ASSERT_ERROR_AND_SET, tr_trigger::class_mop, tr_schema_cache::compiled, er_errid(), ER_HEAP_UNKNOWN_OBJECT, ER_IS_ABORTED_DUE_TO_DEADLOCK, error(), tr_trigger::event, i, insert_trigger_list(), ml_free(), db_objlist::next, NO_ERROR, NULL, tr_schema_cache::objects, db_objlist::op, sm_find_subclass_in_hierarchy(), tr_free_trigger_list(), tr_map_trigger(), tr_validate_schema_cache(), tr_schema_cache::triggers, and ws_mop_compare().
Referenced by get_schema_trigger_objects(), tr_active_schema_cache(), tr_delete_triggers_for_class(), tr_prepare_class(), tr_prepare_statement(), and tr_validate_schema_cache().
const char* TR_ATT_ACTION |
Definition at line 144 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_ACTION_OLD |
Definition at line 145 of file trigger_manager.c.
Referenced by object_to_trigger(), and trigger_to_object().
const char* TR_ATT_ACTION_TIME |
Definition at line 143 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_ACTION_TYPE |
Definition at line 142 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_ATTRIBUTE |
Definition at line 137 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_CLASS |
Definition at line 136 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_CLASS_ATTRIBUTE |
Definition at line 138 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_COMMENT |
Definition at line 147 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), tr_set_comment(), and trigger_to_object().
const char* TR_ATT_CONDITION |
Definition at line 141 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_CONDITION_TIME |
Definition at line 140 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_CONDITION_TYPE |
Definition at line 139 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_EVENT |
Definition at line 133 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_NAME |
Definition at line 131 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), tr_rename_trigger(), and trigger_to_object().
const char* TR_ATT_OWNER |
Definition at line 132 of file trigger_manager.c.
Referenced by au_change_trigger_owner(), define_trigger_classes(), object_to_trigger(), and trigger_to_object().
const char* TR_ATT_PRIORITY |
Definition at line 135 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), tr_set_priority(), and trigger_to_object().
const char* TR_ATT_PROPERTIES |
Definition at line 146 of file trigger_manager.c.
const char* TR_ATT_STATUS |
Definition at line 134 of file trigger_manager.c.
Referenced by define_trigger_classes(), object_to_trigger(), tr_delete_schema_cache(), tr_set_status(), and trigger_to_object().
const char* TR_CLASS_NAME |
Definition at line 130 of file trigger_manager.c.
Referenced by boot_define_view_trigger(), define_trigger_classes(), tr_get_class_name(), tr_is_trigger(), and trigger_to_object().
int tr_Current_depth |
Definition at line 149 of file trigger_manager.c.
Referenced by check_merge_trigger(), check_trigger(), eval_action(), start_state(), tr_finish(), and tr_init().
TR_DEFERRED_CONTEXT* tr_Deferred_activities |
Definition at line 158 of file trigger_manager.c.
TR_DEFERRED_CONTEXT* tr_Deferred_activities_tail |
Definition at line 159 of file trigger_manager.c.
Referenced by add_deferred_activities(), add_deferred_activity_context(), and remove_deferred_context().
TR_TRIGLIST* tr_Deferred_triggers |
TR_TRIGLIST* tr_Deferred_triggers_tail |
bool tr_Invalid_transaction |
Definition at line 153 of file trigger_manager.c.
Referenced by eval_action(), tr_check_abort_triggers(), tr_check_commit_triggers(), tr_check_rollback_triggers(), and tr_init().
char tr_Invalid_transaction_trigger[SM_MAX_IDENTIFIER_LENGTH+2] |
Definition at line 154 of file trigger_manager.c.
Referenced by eval_action(), tr_check_commit_triggers(), and tr_init().
int tr_Maximum_depth |
Definition at line 150 of file trigger_manager.c.
Referenced by start_state(), tr_get_depth(), tr_init(), and tr_set_depth().
int tr_Recursion_level |
int tr_Recursion_level_max |
bool tr_Trace |
Definition at line 156 of file trigger_manager.c.
Referenced by eval_action(), eval_condition(), tr_get_trace(), tr_init(), and tr_set_trace().