Subject | out-of-memory failure with BLOB |
---|---|
Author | |
Post date | 2019-01-09T10:51:41Z |
Hello,
I have a issue with blob in a stored procedure with BLOB variable.
Blob variable is returned by a suspend in a "while do", but the memory allocated to the blob is not released, so memory takes by fbserver increase until a out of memory failure (up to 2Go, the max size of a 32bit process)
My test was made with fbserverser 3.04 32Bit
To reproduce the issue, just execute the script below
After suspend, allocated memory should be release no ?
Thank you
Eric
SET TERM ^ ;
CREATE OR ALTER PROCEDURE BLOB_MEMORY
RETURNS (
B BLOB SUB_TYPE 1 SEGMENT SIZE 80)
AS
begin
b = 'Test';
suspend;
end^
CREATE OR ALTER PROCEDURE BLOB_MEMORY_TEST
RETURNS (
B BLOB SUB_TYPE 1 SEGMENT SIZE 80)
AS
declare variable i integer;
begin
i = 0;
while (i < 15E6) do
begin
select b from BLOB_MEMORY into b;
i = i+ 1;
suspend;
end
end^
SET TERM ; ^
SELECT * FROM BLOB_MEMORY_TEST;