[python-sybase] Segentation faults when connecting to SQL
Server 2000
hopfgartner
hopfgartner at rolmail.net
Tue, 10 Sep 2002 14:05:19 +0200
On Tue, 10 Sep 2002 06:40:18 -0400 (EDT)
Kevin Jacobs <jacobs@penguin.theopalgroup.com> wrote:
> On Tue, 10 Sep 2002, Harri Pasanen wrote:
> > I experienced similar things. Probably if you change
> the query order, it will
> > still be so that the first one works. So the problem
> is that the connection
> > / cursors keep some state that throws it off balance.
> >
> > I managed to work around this by closing the cursor and
> reallocating a new one
> > for the next query. And having opened the connection
> with 'auto_commit=1'
> > also helped.
>
> Attached is a _very_ experimental patch that re-works
> some of the connection
> state logic and locking in the Sybase.py module. Please
> apply it to an
> original copy of Sybase.py, and let me know how it goes.
> With it, I am able
> to run many queries in sequence very reliably.
> Unfortunately, I don't have
> a Sybase installation to test, so I don't know exactly
> where the FreeTDS
> implementation of libCT seems to be diverging from what
> must obviously be
> robust for many Sybase users.
>
> Good luck,
> -Kevin
>
> --
> Kevin Jacobs
> The OPAL Group - Enterprise Systems Architect
> Voice: (216) 986-0710 x 19 E-mail:
> jacobs@theopalgroup.com
> Fax: (216) 986-0714 WWW:
> http://www.theopalgroup.com
The patch behaves exactly like the previous one. Anyway,
your trick of closing and reallocating the cursor for every
query works great.
Thank you,
Peter