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
Memory leak at server, when client select computed field, which used COALESCE or CAST [CORE6370] #6609
Comments
Commented by: @cincuranet I tested this on 3.0.5 x64 and I can confirm it as well. |
Commented by: @asfernandes The leak happens even without data in the table? |
Commented by: Jaromír Krys (fous) Yes, leak happens with empty table and 30 000 rows in try.sql |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @asfernandes Thanks for the test case. Actually it's CAST that was leaking and COALESCE uses CAST internally. |
Modified by: @asfernandessummary: Memory leak at server, when client select computed field, which used coalesce function => Memory leak at server, when client select computed field, which used COALESCE or CAST |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0.7 [ 10940 ] |
Commented by: @asfernandes Please test in the next v3 snapshot. |
Commented by: Jaromír Krys (fous) Tested by try.sql - OK - many thanks |
Submitted by: Jaromír Krys (fous)
I have table with 350 rows - random text:
CREATE TABLE TAB1
(
A1 Varchar(99),
A2 Varchar(199)
);
ALTER TABLE TAB1 ADD A3 COMPUTED BY (coalesce(a1, '')||'-'||coalesce(a2, ''));
and file try.sql:
SELECT a3 FROM tab1;
SELECT a3 FROM tab1;
... 5000 times
SELECT a3 FROM tab1;
I run command:
"c:\Program Files\Firebird\Firebird_3_0\isql.exe" -u SYSDBA -p 1 -i c:\1\try.sql -o c:\1\result.txt "localhost/3051:c:\fdb\try.fdb"
Then, if I observe the firebird server in the task manager, it gradually consumes more and more memory.
However, if I select column a1 (ie uncounted) instead of a3, then the memory consumption does not increase. Also, if the computed would not use coalesce, the consumed memory does not increase (or the consumption increases much more slowly - I'm not sure).
If I use a 2.5.8 server, the memory consumption also does not increase.
commit and new transaction - no change
disconnect and connect - memory is freed
Commits: dde597e
The text was updated successfully, but these errors were encountered: