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 caching of the subquery result (procedure call) in independent queries [CORE5871] #6130

Closed
firebird-issue-importer opened this issue Jul 10, 2018 · 7 comments

Comments

@firebird-issue-importer

Submitted by: @abzalov

Votes: 4

create or alter procedure p1 (N integer) returns (R integer)
as
begin
R = N;
suspend;
end^

commit^

create or alter procedure p2 returns (S varchar(100))
as
declare I integer;
begin
I = 0;
while (I < 3) do
begin
I = I + 1;
SELECT
(SELECT
coalesce(:S, '') || ' ' || :I || '=' || (SELECT R from P1(:I))
FROM RDB$DATABASE
)
FROM RDB$DATABASE
INTO S;
end
suspend;
end^

commit^

select * from p2^
---------------
1=1 2=1 3=1

The procedure is not re-called in the subsequent queries.

Commits: 2f80120

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 17, 2018

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 18, 2018

Modified by: @asfernandes

Version: 4.0 Alpha 1 [ 10731 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 24, 2018

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 1 [ 10750 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 24, 2018

Commented by: @abzalov

Thank you. Will not it be possible to fix it in 3.0?

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 24, 2018

Commented by: @asfernandes

Only if others review and approve a backport.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 1, 2018

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 1, 2018

Modified by: @pavel-zotov

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

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

Successfully merging a pull request may close this issue.

None yet
2 participants