Skip to Content.
Sympa Menu

freetds - Re: TDS 7.0 and queries over 512 bytes

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: TDS 7.0 and queries over 512 bytes
  • Date: Thu, 12 Oct 2000 16:52:19 -0400 (EDT)




On Thu, 12 Oct 2000, Brandon M. Reynolds wrote:

> It's scary that BUFSIZ is used that way inside the code. But anyway
> I tried that and it didn't work. So I changed the code that I felt
> was responsible and it started working. I don't know what this extra
> 'if' statement is for...

Actually, BUFSIZ is used only once in the code which is to do a malloc.
That needs to be cleaned up but it's not causing any problems. I think
you've hit on the real problem here:

> + if (tds->out_pos>=8192) {

It appears that TDS 7.0 does not allow multiple query packets!?

I'm guessing if you made the query larger than 8192 bytes this would again
fail. I'll try to throw a permanent patch together (this one will break
TDS 4.2 and 5.0) if somebody is willing to test it.


Brian

>
> --- freetds/src/tds/write.c Mon Mar 13 07:56:48 2000
> +++ freetds.good/src/tds/write.c Thu Oct 12 12:10:01 2000
> @@ -75,7 +75,7 @@
> int tds_put_byte(TDSSOCKET *tds, unsigned char c)
> {
> /* FIX ME -- add packet size support */
> - if (tds->out_pos>=512) {
> + if (tds->out_pos>=8192) {
> tds_write_packet(tds,0x0);
> tds_init_write_buf(tds);
> }
>
> Brandon M. Reynolds Ph: (330) 644-3059
> Systems Engineer Fax: (330) 644-8110
> Commercial Timesharing Inc. Email: bmr AT comtime.com
>
>
> > -----Original Message-----
> > From: Roger Burton West [mailto:roger AT firedrake.org]
> > Sent: Thursday, October 12, 2000 11:46 AM
> > To: TDS Development Group
> > Subject: [freetds] Re: TDS 7.0 and queries over 512 bytes
> >
> >
> >
> > #define BUFSIZ 2048
> >
> > then recompile freetds from scratch (make clean; make; make install).
> >
> > This is something of a brute force solution, but it worked for me.
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>





Archive powered by MHonArc 2.6.24.

Top of Page