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-automations opened this issue Jul 10, 2018 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

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-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Version: 4.0 Alpha 1 [ 10731 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 1 [ 10750 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @abzalov

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Only if others review and approve a backport.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

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