Incorrect caching of the subquery result (procedure call) in independent queries
--------------------------------------------------------------------------------

                 Key: CORE-5871
                 URL: http://tracker.firebirdsql.org/browse/CORE-5871
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 3.0.3, 2.5.8
            Reporter: Rashid Abzalov


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to