[freetds] SQLGetData (bug in ODBC driver)

Suren A. Chilingaryan csa at dside.dyndns.org
Thu Jul 3 16:38:38 EDT 2008


Dear James K. Lowden,

I have reworked a little bit my patch and have implemented unit tests. 
Actually, in the old patch I have missed the comparison checking if 
there is still data available. This comparison was again checking 
processed number of bytes in output buffer against size of source. And 
BINARY to CHAR conversion (which I said I haven't checked) was actually 
wrong and even not needed.

Additionally, I have implemented the CHAR to BINARY conversion for 
SQLPutData. The unit test is checking both SQLGetData and SQLPutData 
functionality.

The patch against current CVS head is available:
http://dside.dyndns.org/tmp/freetds-20080603-odbc-csa2.patch

and patch against FreeTDS-0.82 is here:
http://dside.dyndns.org/projects/patches.dir/freetds-0.82-odbc-csa2.patch

best regards,
Suren


James K. Lowden wrote:
> Suren A. Chilingaryan wrote:
>> I have checked the modified patch against 0.82. Unfortunately, the first
>> two chunks are failing. The first one fails just on the patch command
>> and second one could be applied, but breaks compilation. However, they
>> are not really related to the described problem and could be omitted.
>> The patch without them works fine for me. Stripped version of patch is
>> available here:
>> http://dside.dyndns.org/tmp/SQLGetData.utf8.odbc.c-r1.diff
> 
> Excellent, thank you.  Applied to the 0.82 branch.  
>> I'll will try to provide unit tests, but I would need a little bit more
>> time for that.
> 
> I hope you will find the time.  It would be valuable.  
> 
> Thanks again for following up.  
> 
> Namaskaram, 
> 
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 



More information about the FreeTDS mailing list