FreeTDS hangs sometimes...

Brian Bruns camber at umcc.ais.org
Fri Dec 17 15:45:00 EST 1999


Most likely what happens is the output buffer (tds->out_buf) fills up and
that triggers it to be flushed so the final packet indicator is not set.
Then when tds_flush_packet is called there is nothing in the output buffer
so it discards it.  interesting. I suppose the flush needs to be moved
so that it happens when byte 513 (on a 512 packet size) comes in as
opposed to byte 512.

Of course I could be totally wrong (since I'm not presently looking at 
the sources). I'll look into it this weekend.

Brian

On Fri, 17 Dec 1999, [iso-8859-1] Tresztnyák László wrote:

>    Hello,
> 
>   I use FreeTDS for accessing a Sybase database from PHP and it works,
> but has a big problem: 
>   If the query string is 498 (or 1002, ...) bytes long (the last TDS
> packet will be exactly 512 byte), the program stops.
> I tested it a bit and found that the execution stops somewhere in the
> FreeTDS code. I guess it's some kind of protocol problem: one of the two
> sides wait for something the other side doesnot send.
> 
>   I don't know enoght about TDS and the internal of the FreeTDS to track
> down this error. Could anybody help me?
> 
>   The environment I use:
>     RedHat Linux 6.0 
>     FreeTDS 0.50
>     Sybase SQL Anywhere Studio for unix 6.0.2
>     PHP4.0b3
>   
>  
>   Laszlo Tersztenyak
> 




More information about the FreeTDS mailing list