[freetds] 0.65 (or whatever) TODO
James K. Lowden
jklowden at freetds.org
Thu Apr 19 23:14:43 EDT 2007
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
More information about the FreeTDS
mailing list