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

Bad treatment of FIRST/SKIP in subselect [CORE634] #996

Closed
firebird-automations opened this issue Nov 8, 2001 · 22 comments
Closed

Bad treatment of FIRST/SKIP in subselect [CORE634] #996

firebird-automations opened this issue Nov 8, 2001 · 22 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pcisar

Relate to CORE3317
Relate to CORE3362
Is duplicated by CORE3862
Is related to QA501

Votes: 3

SFID: 479483#⁠
Submitted By: pcisar

Commands like

delete from table where col in (select col first 5
from table);

doesn't delete up to five rows, but whole table.
Obviously subselect is executed for each row in master
table, but it should not when FIRST is in game.

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

See test core_3362_basic.fbt

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2004-07-19 20:38
Sender: serralta
Logged In: YES
user_id=1086939

When this will be fixed ? I think its a very important fix..

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2002-07-17 23:59
Sender: nobody
Logged In: NO

yea, there is big problem with correlated subqueries in IB
(and also firebird). some cases are described in PLANalyzer
help, but it is not complete and there is more situations,
where IB takes subquery as correlated, even it may not.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Ann Harrison [ awharrison ] => Dmitry Yemanov [ dimitr ]

SF_ID: 479483 =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 [ 10048 ]

SF_ID: 479483 =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

assignee: Dmitry Yemanov [ dimitr ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Eugenk Konkov (kes)

Another testcase for subqueries:

create table test(id int, val char(5));
insert into test values(1, 'red');
insert into test values(2, 'green');
insert into test values(3, 'blue');
insert into test values(2, 'green');*/
delete from test
where http://test.ID in (select id from test GROUP BY id HAVING count(id)>1);

Results for "select * from test" must be:
id value
-- -----
01 red
03 blue

and NOT:
01 red
02 green
03 blue

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 10658 ] => Firebird [ 15007 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Alpha 1 [ 10331 ]

Fix Version: 3.0.0 [ 10048 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ] => Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue relate to CORE3317 [ CORE3317 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Link: This issue block progress on CORE3362 [ CORE3362 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Link: This issue block progress on CORE3362 [ CORE3362 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Link: This issue relate to CORE3362 [ CORE3362 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is duplicated by CORE3862 [ CORE3862 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA501 [ QA501 ]

@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: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Deferred

Test Details: This ticket QA Status should be marked as "Covered by another test(s)" when integral test for core-3362 will be done.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Deferred => Done with caveats

Test Details: This ticket QA Status should be marked as "Covered by another test(s)" when integral test for core-3362 will be done.

=>

Test ("core_3362_basic.fbt") verifies BASIC issues that were accumulated in miscenaleous tickets.
More complex cases (which involve not only SQL but also PSQL features) will
follow in separate .fbt(s) in order to keep size of each test in reasonable limits.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done with caveats => Covered by another test(s)

Test Details: Test ("core_3362_basic.fbt") verifies BASIC issues that were accumulated in miscenaleous tickets.
More complex cases (which involve not only SQL but also PSQL features) will
follow in separate .fbt(s) in order to keep size of each test in reasonable limits.

=>

See test core_3362_basic.fbt

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

Fix Version: 3.0.0 [ 10740 ]

Fix Version: 4.0 Initial [ 10621 ]

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