Skip to Content.
Sympa Menu

freetds - Re: large queries and TDS 7.0

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: large queries and TDS 7.0
  • Date: Tue, 17 Oct 2000 19:47:00 -0400 (EDT)



All checked in. I tested that it detects the block size change, but
someone with the large query problem will probably want to make sure it
works.

Brian

On Tue, 17 Oct 2000, Brian Bruns wrote:

>
> Not to reply to myself but...
>
> SQL 7 indeed does set the blocksize in the env change token. So, this
> means it is not specific to the protocol version but to the configuration
> of the server. Which explains why someone reported the large query
> problem with verison 4.2 hitting SQL 7.
>
> I'm throwing a patch together for real block size support, hopefully
> tonight...we'll see.
>
> Brian
>
> On Tue, 17 Oct 2000, Brian Bruns wrote:
>
> >
> > Do you know if SQL 7 sends back a block size of 4096 in the environment
> > change in the login acknowledgement stream? If so we should just add
> > blocksize support and be done with this mess.
> >
> > Brian
> >
> > On Tue, 17 Oct 2000, Brandon M. Reynolds wrote:
> >
> > > SQL Server 7.0 does in fact use a packet size. The packet size
> > > is configurable by the server. I'm not sure if you can change
> > > it on a per session basis or what... It defaults to 4096.
> > >
> > > Anyway to get this to work I think we need to change TDS_MAX_QUERY to
> > > 4096
> > > and change from:
> > >

> > > int tds_put_byte(TDSSOCKET *tds, unsigned char c)
> > > {
> > > /* FIX ME -- add packet size support */
> > > if ((IS_TDS70(tds) && tds->out_pos>=TDS_MAX_QUERY) ||
> > > (!IS_TDS70(tds) && tds->out_pos>=512)) {
> > > tds_write_packet(tds,0x0);
> > > tds_init_write_buf(tds);
> > > }
> > > tds->out_buf[tds->out_pos++]=c;
> > > }
> > >
> > > to:
> > >
> > > int tds_put_byte(TDSSOCKET *tds, unsigned char c)
> > > {
> > > /* FIX ME -- add packet size support */
> > > if ((IS_TDS70(tds) && tds->out_pos>=TDS_MAX_QUERY) ||
> > > (!IS_TDS70(tds) && tds->out_pos>=512)) {
> > > tds_write_packet(tds,0x0);
> > > tds_init_write_buf(tds);
> > > }
> > > if(tds->out_pos >= tds->out_len) {
> > > tds->out_buf = realloc(tds->out_buf,tds->out_len+2048);
> > > tds->out_len += 2048;
> > > }
> > > tds->out_buf[tds->out_pos++]=c;
> > > }
> > >
> > > also:
> > >
> > > out_len needs to be maintained, eg. initialize it in mem.c and update
> > > it/use
> > > it in a couple of other places.
> > >
> > > Brandon M. Reynolds Ph: (330) 644-3059
> > > Systems Engineer Fax: (330) 644-8110
> > > Commercial Timesharing Inc. Email: bmr AT comtime.com
> > >
> > > ---
> > > You are currently subscribed to freetds as: [camber AT ais.org]
> > > To unsubscribe, forward this message to $subst('Email.Unsub')
> > >
> >
> >
> > ---
> > You are currently subscribed to freetds as: [camber AT ais.org]
> > To unsubscribe, forward this message to $subst('Email.Unsub')
> >
>
>
> ---
> 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