Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Porting Bugzilla to DBD::Sybase: multiple active sth's per dbh
Date: Feb 22 2004 1:17AM

On Sat, 2004-02-21 at 12:05, Edward J. Sabol wrote:
> Hi Michael,
> DBD::Sybase transparently opens a second connection to the database in order
> to emulate multiple active sth's per dbh. That seems pretty reasonable to me,
> but it foils Bugzilla's primitive table locking/transaction processing and
> makes porting Bugzilla to Sybase difficult and possibly infeasible.

One wonders why they used this technique in the first place.

>  Using
> cursors is the obvious solution, but that's a rather invasive change to
> Bugzilla.
>  I'm getting nothing but flak from the other Bugzilla developers
> about this, some of whom want to abandon porting Bugzilla to Sybase entirely.
> Anyway, I'm told that DBD::Mysql and DBD::Pg (for older versions of
> PostgreSQL) both emulate the capability of having multiple active sth's per
> dbh by reading all the data from an unfinished sth into memory when a second
> sth is opened.

I'm sure it's feasible, but off-hand it seems like a non-trivial change,
as DBD::Sybase doesn't do any row caching at all (meaning that the whole
logic of fetching rows would have to be modified to handle this
situation, I think).

I'm not really keen to make such a big change to the code base, although
I would like to have Bugzilla work against Sybase (I admit that I looked
at the Bugzilla code a while back and decided that porting it would be
too difficult because of the way the SQL and database calls are done).

I'll try to look at the DBD::MySQL code and see if there is anything
there that could be reused, though I'd *really* prefer it if someone
(you?) could come up with a patch for DBD::Sybase that would handle
this... :-)

Michael Peppler                           Data Migrations, Inc.           
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions -