Skip to Content.
Sympa Menu

freetds - Re: [freetds] Query Time Out

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Query Time Out
  • Date: Tue, 8 Aug 2006 14:57:43 +0200

> Sorry, looks like my former post is missing:
>
>
>
> Hi,
>
> When using the ODBC driver of FreeTDS, the query will time
> out if the query was sent by a statement used before. The
> code was like:
>
...
>
> It looks to me the tds->query_start_time inside the hstmt
> was not cleaned up correctly. (Actually the value is the old time for
> the first query) This data member looks like a new one to me. (I am
> still using the a FreeTDS version from 2004 and only recently
> updated to
> the 0.64 stable)
>
..

I got it
http://freetds.cvs.sourceforge.net/freetds/freetds/src/odbc/unittests/ti
meout2.c?view=markup

$ ./timeout2
odbctest
--------

connection parameters:
server: 'XXX'
user: 'test'
password: '????'
database: 'test'
use test
create table #timeout(i int)
insert into #timeout values(1)
Loop 0
Sleep 15 seconds to test if timeout occurs
Loop 1
timeout2.c:42 SQLExecute
SQL error S1T00 -- [FreeTDS][SQL Server]Timeout expired


The problem is in src/tds/query.c that do not set query_start_time for
tds_submit_execute. Perhaps the better solution is to set it in
src/tds/util.c but perhaps is better to make this change for next
version and change query.c for 0.64.

Thanks for report!

bye
freddy77





Archive powered by MHonArc 2.6.24.

Top of Page