Skip to Content.
Sympa Menu

freetds - Re: [freetds] 0.65 (or whatever) TODO

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] 0.65 (or whatever) TODO
  • Date: Thu, 19 Apr 2007 23:14:43 -0400

ZIGLIO, Frediano, VF-IT wrote:
> > 3- does odbc handle timeouts correctly? does it stop connection if
> > cancel is not accepted?

AFAICT, no, it does not. :-(

> I have still to make a test... should be somthing like
> - timeout
> - send cancel
> - still timeout
> - close connection...

That's what I think should happen, too. If you set you query_timeout to
X, you wait X for the query to complete, send a cancel, wait (up to) X
again for a confirmation. If none is received, close the connection.

That is, tdserror() will call the ODBC error handler (provided by the
library; the client cannot install his own). On timeout 1, the handler
returns TDS_INT_TIMOUT. On timeout 2, the handler returns TDS_INT_CANCEL.
The trick is to distinguish 1 from 2. ;-)

BTW, I found this in the log, too, when running bsqlodbc:

util.c:110:logic error: cannot change query state from IDLE to PENDING

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page