[freetds] FreeTDS and Ubuntu, iodbc
James K. Lowden
jklowden at freetds.org
Mon Apr 23 10:27:05 EDT 2007
Dan Mohn wrote:
> For the 2nd test, I set the freetds.conf timeouts to 100, so they
> wouldn't timeout at the WAITFOR, then after 20 seconds, (even though it
> wasn't timing out anyway, but just to be safe) I pull the cable. I did
> this about an hour ago, but no response back.
Frediano just told me our ODBC driver doesn't honor the timeout in
freetds.conf. I didn't know that!
According to the ODBC standard, it's up to the application to set a
timeout via SQLSetStmtAttr(SQL_ATTR_QUERY_TIMEOUT). AFAIK the driver is
allowed to have any default timeout it chooses. FreeTDS's default timeout
is infinite; Microsoft's (AIUI) is shorter.
What we can do is first add a timeout option to bsqlodbc, so we can see if
the timeout is working correctly or not. And we can (eventually) change
the driver to respect the timeout in freetds.conf.
Your original query had to do with RealBasic. On the evidence, it's not
setting a timeout. If we can demonstrate the ODBC driver handles timeouts
correctly, then the question becomes how to put one in effect when
RealBasic is the "application". I think you have these choices:
1. Wait for one of us to change the driver.
2. Change the driver yourself.
3. Find the default timeout value (zero) in the ODBC driver, set it to
something you like, and rebuild. I think this is the simplest and easiest
option if it meets your needs.
More information about the FreeTDS