Closed ZaWertun closed 8 years ago
Thanks for the report. I'll check it.
IMO there is no problem. But I checked it several years ago. I forget what I checked. I'll check it again.
When a LOB is temporary and is freed or GC'ed, the associated LOB locator is linked to
svcctx->temp_lobs
because SEGV may occur if OCILobFreeTemporar
is called
in some situations. The lob locators are freed later.
Thanks for investigating. Maybe then I'm doing something wrong... All in all I change my script to close session after reading every 250k rows and that helped me to work around server memory leak (entire select returns about 42 millions of rows).
When
lob_close
called fromoci8_lob_read
it's doing nothing. Functionlob_close
checks forlob->state == S_OPEN
, butlob->state
has valueS_NO_OPEN_CLOSE
in that case.Also if LOB is temporary it must be freed with
OCILobFreeTemporary
function before closing it (somewhere inlob_close
?). Without call toOCILobFreeTemporary
simple SQL likeselect e.xmltype_col.getClobVal() from tmp e
can cause huge memory leak on server side.