[freetds] dblib buffering code rewroted

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Thu Sep 1 09:23:56 EDT 2005


Well.. as someone should have noted I rewrote dblib buffering code in
dblib. The reason is that using blob fields and using dbsetrow we had
double pointer/free and related. This cause we did a binary copy of tds
row not taking in account that tds row could contains pointers. Another
problem was computed row not handled correctly (cause they have
different size compared to normal ones). After some reasoning I decided
to save pointers to tds row and to tdsresult in buffer. This also cause
that current code do not have to copy the row, just the pointer. Someone
could however complain that so we have double pointers to row and
tdsresult. To solve this problem I added reference counter to tdsresult
and only copy row before reading a new row (creating a new row for
tdsresult).

freddy77



More information about the FreeTDS mailing list