Skip to Content.
Sympa Menu

freetds - Re: UPDATE: Hangs after a few thousand iterations...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: UPDATE: Hangs after a few thousand iterations...
  • Date: Fri, 28 Jan 2000 08:23:30 -0800 (PST)


Geoff Winkless writes:
> "Michael Peppler" <mpeppler AT peppler.org> writes:
> > rwk AT AmeriCom.com writes:
> > > I have found the problem!
> > >
> > > I you don't fetch the entire result set before starting another, it
> > > appears something eventually hangs (see !!! below).
> > >
> > > The while loop around the fetch seems to fix it.
> > >
> > > I'm still not sure where, why, or how it hangs without it, but at
> > least
> > > now it doesn't hang.
> >
> > $sth->finish() sends a ct_cancel() to the server. There have been
> > reports (on other platforms too) that this is sometimes broken, hence
> > the syb_flush_finish attribute which will actually fetch all the
> > remaining results in the finish() call instead of using ct_cancel().
>
> certainly in dblib, a cancel after you've fetched the column titles from
> the
> server only affects the current query -- so if you've got two queries in
> one
> sqlexec and one is still pending, that one will need to be cancelled also.

I thought DBlib has dbcancel() (cancel all pending results) and
dbcanquery() (cancel the current query).

> If you cancel before you fetch the column titles then it cancels all
> currently pending items.
>
> This might have something to do with it.

Possible - but in any case DBD::Sybase uses ClientLibrary and issues a
ct_cancel(CS_CANCEL_ALL) if there are pending results. This works fine
with the 11.9.2 server on linux (and with any server I've tried it on
on other platforms [essentially that means solaris :-)])

Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler AT peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list AT isug.com




Archive powered by MHonArc 2.6.24.

Top of Page