[freetds] SQLGetData (bug in ODBC driver)

Suren A. Chilingaryan csa at dside.dyndns.org
Sun Jun 15 17:45:13 EDT 2008


Dear James,

thanks a lot for applying :)

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

I'll will try to provide unit tests, but I would need a little bit more
time for that.

best regards,
Suren



James K. Lowden wrote:
> Suren, 
> 
> Thank you kindly for your analysis and patch.  I modified it to conform
> with FreeTDS style (and some preferences of my own) and applied it to CVS
> HEAD.  I also posted the modified patch at
> 
> http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/SQLGetData.utf8.odbc.c.diff.
> 
> Checking in src/odbc/odbc.c;
> /cvsroot/freetds/freetds/src/odbc/odbc.c,v  <--  odbc.c
> new revision: 1.482; previous revision: 1.481
> 
> I applied your patch because it looks reasonable and doesn't break any
> unit tests,[1] and to save Frediano some effort.  I'm not set up to test
> it, though.  
> 
> If you would like to, there are a couple of other things you could do that
> would be very helpful:
> 
> 1.  Apply my modification of your patch to your 0.82 installation, to
> confirm it still works as it should.  
> 
> 2.  Modify src/odbc/unittests/getdata.c to test the condition addressed by
> the change.  
> 
> 3.  Let us know.  
> 
> This sort of thing is quite tricky to get right.  A unit test could
> confirm it's correct at the lowest level.  
> 
> Best regards, 
> 
> --jkl
> 
> [1] My test server went down halfway through the tests, but getdata.c ran.
>  
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 



More information about the FreeTDS mailing list