Skip to Content.
Sympa Menu

freetds - Re: [freetds] tdsdump SIGSEGV with mt apps

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] tdsdump SIGSEGV with mt apps
  • Date: Fri, 15 Apr 2005 17:29:42 +0200

Il giorno ven, 15-04-2005 alle 19:17 +1000, liam AT inodes.org ha scritto:
> On Wed, Apr 13, 2005 at 10:37:43AM -0400, James K. Lowden wrote:
>
> > but what we really lack is someone steeped in unix tcp/ip idiom.
>
> It's not only just that, things like 'timeout' and 'query timeout'
> specified in the configuration are not even passed into TDSSOCKET.
>
> I've set 'timeout = 5' and 'query timeout = 5' both globally and
> for each DSN in freetds.conf. Looking in goodread() I have:
>
> (gdb) inspect tds->timeout
> There is no member named timeout.
> (gdb) inspect tds->query_timeout
> $3 = 0
>
> This information appears to be gathered from tds_read_config_info()
> at dblib.c:946 but then promptly destroyed at dblib.c:971 without
> transfering it to TDSSOCKET or DBPROCESS!
>

I think problem is query_timeout_func/query_timeout_param, dblib should
set TDSCONNECTION, not TDSSOCKET...
Also tds_connect should at the end set query_timeout to TDSCONNECTION-
>query_timeout...
At this point timeout in freetds.conf should be query_timeout and
timeout member in TDSCONNECTION should be removed... Does this should
correct?
I think that a test for timeout in dblib could help...

> If you're happy for me to go through and amend all this, please
> let me know and I'll send through a patch.
>
> Thanks.

Well.. I changed this code some time ago. There were 3 timeout:
- connect_timeout
- query_timeout
- timeout
not easy to handle... So now in libTDS there is only a single timeout.
If you want to handle timeout on connection set query_timeout on
TDSCONNECTION, if you want to set timeout on query use query_timeout. If
you want to poll in libTDS setup up query_timeout with polling interval
and increment it when timeout raise.

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page