[freetds] [quetzal at zone3000.net: Unstable behavior of the system with tds version = 4.2 (maybe a kernel bug?)]

James K. Lowden jklowden at freetds.org
Wed May 9 20:22:49 EDT 2007


Nikolay Pavlov wrote:
> On Tuesday,  8 May 2007 at 19:57:14 -0400, James K. Lowden wrote:
> > Nikolay Pavlov wrote:
> > > cs.c:358:cs_convert() srctype = 127 (8) desttype = 47 (9)
> > > cs.c:520:cs_convert() calling tds_convert
> > > cs.c:523:cs_convert() tds_convert returned 9
> > > cs.c:654:cs_convert() FMT_NULLTERM
> > > cs.c:656:not enough room for data + a null terminator - error
> > > cs.c:706:cs_convert() returning  0
> > > ct.c:1729:cs_convert-result = 1
> > > ct.c:1732:
> > >   convert failed for 20
> > 
> > 
> > I don't know what's eating your CPU, but you have an error: the caller
> > is not providing sufficient buffer space to convert an 8-byte integer
> > to a character.  FreeTDS apparently wants 9 bytes and is given only 8.
> >  
> > 
> > Perhaps the caller is also failing to handle the error correctly? 
> 
> Thanks for reponse James. Can it be caused by the "tds version" field in
> configuration file?

I don't see how, except a quick look indicates that on on a TDS 4.2
connection the server converts an 8-byte integer to floating point:

[25] varley.master.1> select cast(1E4 as int) as one, cast(1E4 as bigint)
as ouch 
[25] varley.master.2> go
 one         ouch                
 ----------- --------------------
       10000         10000.000000

(1 row affected)

That means the application isn't forced to provide a character buffer for
bigint data.  

--jkl



More information about the FreeTDS mailing list