SET BLOB in dynamic SQL: unclear buffer reuse after Firebird 4.0.2 patch
0 reputation · 28 Sept 2022, 13:21 UTC
Goal
Determine whether the server reuses temporary BLOB buffers or allocates new ones for each execution of the SET BLOB statement when used inside dynamic SQL, after applying the 4.0.2 memory‑leak fix.
Constraints
Transactions involve writing BLOBs larger than 1 GB with the BLOB_SUB_TYPE storage type. The behavior must be observed in a long‑running transaction and measured via Firebird’s MON$ tables.
Unresolved Behavior
Documentation does not specify whether the server reuses the temporary buffer across executions or frees it after each use. The 4.0.2 patch changes internal buffer handling, but its impact on dynamic SQL remains undocumented.
Questions
- Does each
SET BLOBexecution allocate a fresh temporary buffer, or is the buffer reused within a transaction? - Are the temporary buffers released immediately after the statement completes, or only upon transaction commit?
- How does enabling Event Monitoring for BLOB write events influence buffer allocation and memory usage in this scenario?