Skip to Content.
Sympa Menu

freetds - RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib

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] [ freetds-Patches-1120675 ] new features in ctlib
  • Date: Wed, 16 Feb 2005 20:24:41 +0100

Il giorno mer, 16-02-2005 alle 19:40 +0100, Frediano Ziglio ha scritto:
...
> >
> > cancel.c: Check asynchronous called ct_cancel()
> > ct_results() result_type CS_CMD_FAIL.
> > More results?...
> > do_fetch retrieved 10000 rows
> > do_fetch() returned: 0
> > More results?...
> > All rows read, this may not occur.
> > FAIL: cancel
> >
>
> It seems that it fetched all rows before SIGALRM !!! Very strange
> however I must say that usually it stops at 4000 in my tests so perhaps
> you are right and our library is too fast :). I don't know how accurate
> can be the timer... I don't know if it's better to increase row count or
> decrease timeout...
>
> > So I think sometimes the program/database just too fast for the test
> > sometimes.
> >
> > If you enable TDSDUMP it always pass (because program always much
> > slower),
> > but it produce 27Mb TDSDUMP file ! I don't get core dump.
> >
>
> Perhaps it fail in my environment cause I use to append debug info. If
> you enable debug file is closed and opened many time so you can free
> FILE* in a signal causing corruption... not that funny!!
>

Fixed. If in append use automatic variables.
However now using Sybase cancel seems to do an infinite loop :(

> > I'll look further at the problem and at the cursor free-ing issue.
> > I also don't see this problem , but my old compiler probably doesn't
> > notice the issue.
> >
> > Bill
> >
>
> I used a memory debugger to discover the issue (valgrind). It's not
> portable however I would suggest ElectricFence under other environments.
> The problem is that after tds_cursor_dealloc you don't know when libTDS
> free TDSCURSOR structure so it's better to clear reference and do not
> use memory anymore... I noted however that in ct_cmd_props you can read
> cursor status after deallocation (ct_cursor test line 256)... is it
> true?
>

Fixed... tds_cursor_close can deallocare cursor, in this case reset cmd-
>cursor too.

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page