Skip to Content.
Sympa Menu

freetds - RE: [freetds] TODO reviewed

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] TODO reviewed
  • Date: Mon, 11 Apr 2005 19:07:43 +0200

On Mon, 2005-04-11 at 18:16, Lowden, James K wrote:
> > From: Thompson, Bill D (London)
> > Sent: Monday, April 11, 2005 8:42 AM
> >
> > > . ct_dynamic and friends needed for DBD::Sybase placeholder support
> > > Done?? Someone did accurate testing ??
> >
> > yes, done and tested (to the best of my ability).
> > There is a ctlib/unittest for this functionality.
> > I haven't tested with DBD::Sybase, although I *think* I asked Michael
> > Peppler to do so if/when he had time.
>
> Hi Bill,
>
> I have CVS HEAD installed and the DBD::Sybase test t/exec.t fails. Did
> it ever work?
>
> I noticed two things:
>
> 1. DBD::Sybase seems to send "COMMIT TRANSACTION" with no corresponding
> BEGIN TRAN. It uses ct_options to set CS_OPT_CHAINXACTS (0x07) but
> ct_options is a one big noop:

You can build it to not use CS_OPT_CHAINXACTS and to use explicit
transactions (for AutoCommit OFF mode) instead.

You probably want to get the latest 1.05_01 for this - it fixes a couple
of problems with this specific issue.

> 2. The placeholder logic seems not to pass valid SQL to the server.
> Look at this code from t/exec.t:
>
> my $sth = $dbh->prepare("exec sp_helpindex \@objname = ?");
> ok(defined($sth), 'Prepare sp_helpindex');
> my $rc;
> $rc = $sth->execute("sysusers");

There are two placeholder uses in DBD::Sybase. The one that is exercised
by t/exec.t is actually using the RPC functionality
(ct_command(CS_RPC_CMD) and ct_param()).
The one exercised by t/place.t is the "real" ct_dynamic() functionality
(i.e. "select ... from foo where bar = ?").

Michael
--
Michael Peppler - mpeppler AT peppler.org - http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html






Archive powered by MHonArc 2.6.24.

Top of Page