Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Computed field returns null value inside BI trigger [CORE4201] #4526

Closed
firebird-automations opened this issue Aug 31, 2013 · 9 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Gorynich (gorynich)

Is related to CORE3874

CREATE TABLE NEW_TABLE (
NEW_FIELD1 INTEGER NOT NULL,
COMP_FIELD COMPUTED BY (NEW_FIELD1+1),
NEW_FIELD2 INTEGER
);

SET TERM ^ ;

CREATE TRIGGER NEW_TABLE_BI0 FOR NEW_TABLE
ACTIVE BEFORE INSERT POSITION 0
as
begin
new.New_Field2 = new.Comp_Field;
end
^
SET TERM ; ^

INSERT INTO NEW_TABLE (NEW_FIELD1)
VALUES (1);

NEW_FIELD1 - 1
COMP_FIELD - 2
NEW_FIELD2 - null ??????????? why ?

Firebird-2.5.2.26540

NEW_FIELD1 - 1
COMP_FIELD - 2
NEW_FIELD2 - 2 OK :)

Commits: e5d1202 3b1b348 FirebirdSQL/fbt-repository@1aaa180 FirebirdSQL/fbt-repository@0bfc687

====== Test Details ======

Code in the test works fine from FB 2.0.7.
Either it need to be re-implemented or this bug existed only in some snapshot of 3.x.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue is related to CORE3874 [ CORE3874 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

It seems that all previous FB/IB versions supported this functionality.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

summary: computed field has null value inside BI trigger => Regression: computed field now has null value inside BI trigger

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

summary: Regression: computed field now has null value inside BI trigger => Regression: Computed field returns null value inside BI trigger

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Alpha 2 [ 10560 ]

Version: 2.5.3 [ 10461 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done with caveats

Test Details: Code in the test works fine from FB 2.0.7.
Either it need to be re-implemented or this bug existed only in some snapshot of 3.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants