19 #ifndef _TRIGGER_MANAGER_H_ 20 #define _TRIGGER_MANAGER_H_ 24 #if defined (SERVER_MODE) 25 #error Does not belong to server module 40 #define TR_LOWEST_PRIORITY 0.0 50 #define TR_MAX_RECURSION_LEVEL 32 60 #define TR_MAX_PRINT_STRING 2048 63 #define tr_free_schema_cache_and_init(cache) \ 66 tr_free_schema_cache ((cache)); \ 244 extern void tr_dump (FILE * fpp);
287 const char **attnames);
288 #if defined(ENABLE_UNUSED_FUNCTION) 305 #if defined(ENABLE_UNUSED_FUNCTION) 306 extern void tr_check_timeout_triggers (
void);
310 #if defined(ENABLE_UNUSED_FUNCTION) 311 extern int tr_set_savepoint (
void *savepoint_id);
312 extern int tr_abort_to_savepoint (
void *savepoint_id);
348 bool * has_event_type_triggers);
372 #if defined(ENABLE_UNUSED_FUNCTION) 373 extern int tr_dump_all_triggers (FILE * fp,
bool quoted_id_flag);
378 #if defined(ENABLE_UNUSED_FUNCTION) 380 extern int tr_downcase_all_trigger_info (
void);
int tr_update_user_cache(void)
const char * TR_ATT_ACTION
int tr_merge_schema_cache(TR_SCHEMA_CACHE *destination, TR_SCHEMA_CACHE *source)
char tr_Invalid_transaction_trigger[SM_MAX_IDENTIFIER_LENGTH+2]
const char * TR_ATT_COMMENT
int tr_drop_deferred_activities(DB_OBJECT *trigger_object, DB_OBJECT *target)
int tr_rename_trigger(DB_OBJECT *trigger_object, const char *name, bool call_from_api)
const char * TR_ATT_ACTION_OLD
int tr_trigger_event(DB_OBJECT *trigger_object, DB_TRIGGER_EVENT *event)
TR_DEFERRED_CONTEXT * tr_Deferred_activities
const char * TR_ATT_EVENT
struct tr_activity * condition
const char * tr_time_as_string(DB_TRIGGER_TIME time)
int tr_prepare_statement(TR_STATE **state_p, DB_TRIGGER_EVENT event, DB_OBJECT *class_, int attcount, const char **attnames)
int tr_delete_triggers_for_class(TR_SCHEMA_CACHE **cache, DB_OBJECT *class_object)
const char * TR_ATT_CONDITION_TIME
const char * TR_ATT_PRIORITY
int tr_trigger_action_type(DB_OBJECT *trigger_object, DB_TRIGGER_ACTION *type)
int tr_trigger_attribute(DB_OBJECT *trigger_object, char **attribute)
bool tr_Invalid_transaction
#define SM_MAX_IDENTIFIER_LENGTH
const char * tr_event_as_string(DB_TRIGGER_EVENT event)
int tr_has_user_trigger(bool *has_user_trigger)
void tr_abort(TR_STATE *state)
void tr_check_abort_triggers(void)
TR_TRIGLIST * triggers[1]
int tr_drop_trigger(DB_OBJECT *obj, bool call_from_api)
int tr_find_event_triggers(DB_TRIGGER_EVENT event, DB_OBJECT *class_, const char *attribute, bool active, DB_OBJLIST **list)
const char * TR_ATT_CONDITION_TYPE
const char * tr_get_class_name(void)
bool tr_set_execution_state(bool new_state)
int tr_set_trace(bool trace)
int tr_active_schema_cache(MOP class_mop, TR_SCHEMA_CACHE *cache, DB_TRIGGER_EVENT event_type, bool *has_event_type_triggers)
int tr_Recursion_level_max
struct tr_triglist * prev
int tr_set_status(DB_OBJECT *trigger_object, DB_TRIGGER_STATUS status, bool call_from_api)
struct tr_schema_cache * next
const char * TR_ATT_ACTION_TYPE
int tr_empty_schema_cache(TR_SCHEMA_CACHE *cache)
int tr_unmap_trigger(TR_TRIGGER *trigger)
int tr_prepare_class(TR_STATE **state_p, TR_SCHEMA_CACHE *cache, MOP class_Mop, DB_TRIGGER_EVENT event)
const char * TR_CLASS_NAME
TR_TRIGLIST * tr_Deferred_triggers_tail
const char * TR_ATT_ACTION_TIME
const char * TR_ATT_OWNER
struct tr_activity * action
int tr_check_authorization(DB_OBJECT *trigger_object, int alter_flag)
struct tr_schema_cache TR_SCHEMA_CACHE
const char * TR_ATT_PROPERTIES
const char * TR_ATT_ATTRIBUTE
int tr_find_all_triggers(DB_OBJLIST **list)
const char * tr_status_as_string(DB_TRIGGER_STATUS status)
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)
int tr_trigger_action_time(DB_OBJECT *trigger_object, DB_TRIGGER_TIME *tr_time)
int tr_drop_cache_trigger(TR_SCHEMA_CACHE *cache, DB_OBJECT *trigger_object)
int tr_delete_schema_cache(TR_SCHEMA_CACHE *cache, DB_OBJECT *class_object)
struct tr_trigger TR_TRIGGER
int tr_after(TR_STATE *state)
int tr_trigger_condition(DB_OBJECT *trigger_object, char **condition)
int tr_add_cache_trigger(TR_SCHEMA_CACHE *cache, DB_OBJECT *trigger_object)
int tr_before(TR_STATE *state)
const char * TR_ATT_CONDITION
unsigned short array_length
void tr_check_rollback_triggers(DB_TRIGGER_TIME time)
int tr_trigger_status(DB_OBJECT *trigger_object, DB_TRIGGER_STATUS *status)
const char * TR_ATT_CLASS_ATTRIBUTE
TR_SCHEMA_CACHE * tr_make_schema_cache(TR_CACHE_TYPE type, DB_OBJLIST *objects)
DB_OBJECT * tr_find_trigger(const char *name)
TR_SCHEMA_CACHE * tr_copy_schema_cache(TR_SCHEMA_CACHE *cache, MOP filter_class)
struct tr_deferred_context TR_DEFERRED_CONTEXT
int tr_set_depth(int depth)
int tr_trigger_name(DB_OBJECT *trigger_object, char **name)
int tr_trigger_priority(DB_OBJECT *trigger_object, double *priority)
int tr_trigger_class(DB_OBJECT *trigger_object, DB_OBJECT **class_)
int tr_is_trigger(DB_OBJECT *trigger_object, int *status)
void tr_free_trigger_list(TR_TRIGLIST *list)
void tr_free_schema_cache(TR_SCHEMA_CACHE *cache)
int tr_get_cache_objects(TR_SCHEMA_CACHE *cache, DB_OBJLIST **list)
int tr_before_object(TR_STATE *state, DB_OBJECT *current, DB_OBJECT *temp)
int tr_after_object(TR_STATE *state, DB_OBJECT *current, DB_OBJECT *temp)
struct tr_triglist TR_TRIGLIST
struct tr_deferred_context * prev
int tr_set_comment(DB_OBJECT *trigger_object, const char *comment, bool call_from_api)
bool tr_get_execution_state(void)
struct tr_triglist * next
int tr_trigger_comment(DB_OBJECT *trigger_objet, char **comment)
struct tr_deferred_context * next
int tr_check_commit_triggers(DB_TRIGGER_TIME time)
TR_DEFERRED_CONTEXT * tr_Deferred_activities_tail
const char * TR_ATT_CLASS
void tr_invalidate_user_cache(void)
int tr_execute_deferred_activities(DB_OBJECT *trigger_object, DB_OBJECT *target)
int tr_trigger_condition_time(DB_OBJECT *trigger_object, DB_TRIGGER_TIME *tr_time)
TR_TRIGGER * tr_map_trigger(DB_OBJECT *object, int fetch)
int tr_validate_schema_cache(TR_SCHEMA_CACHE *cache, MOP class_mop)
int tr_trigger_action(DB_OBJECT *trigger_object, char **action)
TR_TRIGLIST * tr_Deferred_triggers
int tr_set_priority(DB_OBJECT *trigger_object, double priority, bool call_from_api)
const char * TR_ATT_STATUS