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
Incorrect handling of null within view - returns 0 [CORE871] #1263
Comments
Modified by: @dyemanovassignee: Claudio Valderrama C. [ robocop ] |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.1 [ 10041 ] |
Commented by: @pcisar Fix confirmed for 2.1 Alpha 1. Test added. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @pcisar Reopened to update ticket information. |
Modified by: @pcisarWorkflow: jira [ 11093 ] => Firebird [ 14447 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] QA Status: No test => Done successfully |
Submitted by: Adam Gardner (s3057043)
Assigned to: Claudio Valderrama C. (robocop)
Duplicates CORE514
Is related to QA92
If within a view one uses a left outer join and returns a field from the right table (defined as a domain with a not null constraint), the view incorrectly returns a 0 instead of <null>.
The script is at end of post.
Notes / Observations:
* This bug looks similar to the bug listed here which was apparently fixed in 1.0
CORE514
* There is a pretty simple work around, simply use a cast in the view definition, simply cast the field as the base datatype
* This bug only occurs if the field is defined as a domain, and that domain has a not null constraint.
Related Support List Post:
http://groups.yahoo.com/group/firebird-support/message/78126 (archive)
Script to Duplicate:
--
CREATE DOMAIN D INTEGER NOT NULL;
CREATE TABLE T (A D);
CREATE TABLE U (B D);
CREATE VIEW V (A, B) AS
SELECT T.A, U.B FROM T LEFT JOIN U ON (T.A = U.B);
COMMIT;
INSERT INTO T VALUES(1);
COMMIT;
SELECT * FROM V;
--
Commits: 8b74a50
The text was updated successfully, but these errors were encountered: