Skip to content

Commit

Permalink
Fix, thanks to Alex.
Browse files Browse the repository at this point in the history
  • Loading branch information
asfernandes committed Jan 25, 2025
1 parent ddbc39a commit 0aee958
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dsql/StmtNodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8907,8 +8907,7 @@ const StmtNode* StoreNode::store(thread_db* tdbb, Request* request, WhichTrigger

rpb->rpb_number.setValid(true);

if (relation && (relation->rel_post_store || relation->isSystem()) &&
relation->rel_post_store && whichTrig != PRE_TRIG)
if (relation && (relation->rel_post_store || relation->isSystem()) && whichTrig != PRE_TRIG)
{
EXE_execute_triggers(tdbb, &relation->rel_post_store, NULL, rpb,
TRIGGER_INSERT, POST_TRIG);
Expand Down

2 comments on commit 0aee958

@aafemt
Copy link
Contributor

@aafemt aafemt commented on 0aee958 Jan 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old code: rel_post_store == false and isSystem() == true => overall condition is false.
New code: rel_post_store == false and isSystem() == true => overall condition is true.

Are you sure that this should work this way?

@AlexPeshkoff
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aafemt Old code was wrong, pay attention - relation->isSystem() did not affect the result.

Please sign in to comment.