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

Incorrect handling of null within view - returns 0 [CORE871] #1263

Closed
firebird-automations opened this issue Jul 25, 2006 · 13 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

firebird-automations commented Jul 25, 2006

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Claudio Valderrama C. [ robocop ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue duplicates CORE514 [ CORE514 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 2.1 [ 10041 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Fix confirmed for 2.1 Alpha 1. Test added.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Reopened to update ticket information.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Closed [ 6 ] => Reopened [ 4 ]

resolution: Fixed [ 1 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Fix Version: 2.1 Alpha 1 [ 10150 ]

Fix Version: 2.1.0 [ 10041 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Reopened [ 4 ] => Closed [ 6 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA92 [ QA92 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 11093 ] => Firebird [ 14447 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Done successfully

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

1 participant