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: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib
  • Date: Thu, 17 Feb 2005 12:56:03 -0000

Freddy,

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

Are you sure about that ?
I don't see any infinite loop, althoug program takes a while to run.
retrieving 10000 rows with TDSDUMP on will generate a LOT of very
repetitive output...

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

I've looked at your fix. If it works, it's as good as I could come up
with at the moment....
I may take a close look at the cursor code, with the benefit of
hindsight.
I'd prefer to reset cmd->cursor when we receive back the DONE status for
the cursor dealloc/close-with-dealloc
I can't see a way to do this yet, but I may come up with something.

Thanks for your help,

Bill


-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Frediano Ziglio
Sent: 16 February 2005 19:25
To: FreeTDS Development Group
Subject: RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib


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


_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy, retain or
redistribute it. Click here for important additional terms relating to this
e-mail. http://www.ml.com/email_terms/
--------------------------------------------------------





Archive powered by MHonArc 2.6.24.

Top of Page