Skip to content

Commit b5f5ba1

Browse files
committed
Save value of RDB$TRIGGERS.RDB$SYSTEM_FLAG into Trigger::sysTrigger
1 parent d8b62a1 commit b5f5ba1

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/jrd/jrd.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,19 @@ class Trigger
137137
public:
138138
Firebird::HalfStaticArray<UCHAR, 128> blr; // BLR code
139139
Firebird::HalfStaticArray<UCHAR, 128> debugInfo; // Debug info
140-
Statement* statement; // Compiled statement
140+
Statement* statement; // Compiled statement
141141
bool releaseInProgress;
142-
bool sysTrigger;
142+
SSHORT sysTrigger; // See fb_sysflag in constants.h
143143
FB_UINT64 type; // Trigger type
144144
USHORT flags; // Flags as they are in RDB$TRIGGERS table
145145
jrd_rel* relation; // Trigger parent relation
146-
MetaName name; // Trigger name
147-
MetaName engine; // External engine name
146+
MetaName name; // Trigger name
147+
MetaName engine; // External engine name
148148
Firebird::string entryPoint; // External trigger entrypoint
149149
Firebird::string extBody; // External trigger body
150150
ExtEngineManager::Trigger* extTrigger; // External trigger
151151
Nullable<bool> ssDefiner;
152-
MetaName owner; // Owner for SQL SECURITY
152+
MetaName owner; // Owner for SQL SECURITY
153153

154154
bool isActive() const;
155155

src/jrd/met.epp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static int blocking_ast_relation(void*);
115115
static int partners_ast_relation(void*);
116116
static int rescan_ast_relation(void*);
117117
static ULONG get_rel_flags_from_FLAGS(USHORT);
118-
static void get_trigger(thread_db*, jrd_rel*, bid*, bid*, TrigVector**, const TEXT*, FB_UINT64, bool,
118+
static void get_trigger(thread_db*, jrd_rel*, bid*, bid*, TrigVector**, const TEXT*, FB_UINT64, SSHORT,
119119
USHORT, const MetaName&, const string&, const bid*, Nullable<bool> ssDefiner);
120120
static bool get_type(thread_db*, USHORT*, const UCHAR*, const TEXT*);
121121
static void lookup_view_contexts(thread_db*, jrd_rel*);
@@ -124,7 +124,7 @@ static ValueExprNode* parse_field_default_blr(thread_db* tdbb, bid* blob_id);
124124
static BoolExprNode* parse_field_validation_blr(thread_db* tdbb, bid* blob_id, const MetaName name);
125125
static bool resolve_charset_and_collation(thread_db*, USHORT*, const UCHAR*, const UCHAR*);
126126
static void save_trigger_data(thread_db*, TrigVector**, jrd_rel*, Statement*, blb*, blb*,
127-
const TEXT*, FB_UINT64, bool, USHORT, const MetaName&, const string&,
127+
const TEXT*, FB_UINT64, SSHORT, USHORT, const MetaName&, const string&,
128128
const bid*, Nullable<bool> ssDefiner);
129129
static void scan_partners(thread_db*, jrd_rel*);
130130
static bool verify_TRG_ignore_perm(thread_db*, const MetaName&);
@@ -2049,7 +2049,7 @@ void MET_load_trigger(thread_db* tdbb,
20492049
triggers,
20502050
TRG.RDB$TRIGGER_NAME,
20512051
TRG.RDB$TRIGGER_TYPE,
2052-
(bool) TRG.RDB$SYSTEM_FLAG,
2052+
TRG.RDB$SYSTEM_FLAG,
20532053
trig_flags,
20542054
engine,
20552055
entryPoint,
@@ -2070,7 +2070,7 @@ void MET_load_trigger(thread_db* tdbb,
20702070
triggers + trigger_action,
20712071
TRG.RDB$TRIGGER_NAME,
20722072
(UCHAR) trigger_action,
2073-
(bool) TRG.RDB$SYSTEM_FLAG,
2073+
TRG.RDB$SYSTEM_FLAG,
20742074
trig_flags,
20752075
engine,
20762076
entryPoint,
@@ -3382,7 +3382,7 @@ void MET_parse_sys_trigger(thread_db* tdbb, jrd_rel* relation)
33823382
if (trig_flags & TRG_ignore_perm)
33833383
statement->flags |= Statement::FLAG_IGNORE_PERM;
33843384

3385-
save_trigger_data(tdbb, ptr, relation, statement, NULL, NULL, NULL, type, true, 0, "",
3385+
save_trigger_data(tdbb, ptr, relation, statement, NULL, NULL, NULL, type, TRG.RDB$SYSTEM_FLAG, 0, "",
33863386
"", NULL, Nullable<bool>());
33873387
}
33883388
}
@@ -4744,7 +4744,7 @@ ULONG MET_get_rel_flags_from_TYPE(USHORT type)
47444744
static void get_trigger(thread_db* tdbb, jrd_rel* relation,
47454745
bid* blob_id, bid* debug_blob_id, TrigVector** ptr,
47464746
const TEXT* name, FB_UINT64 type,
4747-
bool sys_trigger, USHORT flags,
4747+
SSHORT sys_trigger, USHORT flags,
47484748
const MetaName& engine, const string& entryPoint,
47494749
const bid* body, Nullable<bool> ssDefiner)
47504750
{
@@ -5126,7 +5126,7 @@ static bool resolve_charset_and_collation(thread_db* tdbb,
51265126
static void save_trigger_data(thread_db* tdbb, TrigVector** ptr, jrd_rel* relation,
51275127
Statement* statement, blb* blrBlob, blb* debugInfoBlob,
51285128
const TEXT* name, FB_UINT64 type,
5129-
bool sys_trigger, USHORT flags,
5129+
SSHORT sys_trigger, USHORT flags,
51305130
const MetaName& engine, const string& entryPoint,
51315131
const bid* body, Nullable<bool> ssDefiner)
51325132
{

0 commit comments

Comments
 (0)