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

Multiple Rows in Singleton Select not reported in a View [CORE1572] #1990

Closed
firebird-automations opened this issue Nov 7, 2007 · 11 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Ivano Di Mizio (ivanodm)

Is related to QA165

Consider a database like this:

CREATE TABLE TABLE1 ( ID1 INTEGER NOT NULL, FIELD1 VARCHAR(20));
CREATE TABLE TABLE2 ( ID2 INTEGER NOT NULL, FIELD2 VARCHAR(20));

INSERT INTO TABLE1 (ID1, FIELD1) VALUES (1, 'ONE');
INSERT INTO TABLE2 (ID2, FIELD2) VALUES (2, 'TWO');
INSERT INTO TABLE2 (ID2, FIELD2) VALUES (3, 'THREE');

CREATE VIEW VIEW_TABLE( ID1, FIELD1, FIELD2) AS
SELECT TABLE1.ID1, TABLE1.FIELD1, ( SELECT TABLE2.FIELD2 FROM TABLE2 ) FROM TABLE1;

If you run this query:

SELECT * FROM VIEW_TABLE;

There is no error raised and the data returned is:

ID1 FIELD1 FIELD2
--- ------ ------
1 ONE TWO

If you instead run the same query the VIEW is based on:

SELECT TABLE1.ID1, TABLE1.FIELD1, ( SELECT TABLE2.FIELD2 FROM TABLE2 ) FROM TABLE1;

a "Multiple Rows in Singleton Select" error is correctly reported.

This behaviour only applies to Firebird 2.0.x.
With Firebird 2.1 Beta 2 the error is correctly displayed in both cases.

Commits: 4216ef7

@firebird-automations
Copy link
Collaborator Author

Modified by: Ivano Di Mizio (ivanodm)

summary: Multiple Rows in Singleton Select not reported in a View.txt => Multiple Rows in Singleton Select not reported in a View

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Adriano, could you please research the reason and consider a backport into v2.0.4 when time permits?

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Problem is (I suppose) same as CORE881 Singleton is not respected in COMPUTED BY expressions.
I'll test and backport tonight or latter this weak.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.0.4 [ 10211 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA165 [ QA165 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 13387 ] => Firebird [ 14057 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

Q/A test ok and qmtest made

@firebird-automations
Copy link
Collaborator Author

Modified by: @pmakowski

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

2 participants