RE: Incompatibility with DBI v1.56 / DBD::Sybase v1.08 / DBIx::ContextualFetch v1.03
- From: David.Wood@xxxxxxxxxx (David Wood)
- Date: Thu, 7 Jun 2007 22:01:52 -0400
Much obliged for the quick fix Tim! I found another problem with
DBD::Sybase v1.08 and Ima::DBI ... although it was easy to work around.
I created these bug reports:
http://www.peppler.org/bugdb/view?bug_id=632
http://www.peppler.org/bugdb/view?bug_id=633
Everything now seems to be working with both of these patches. Yippee
:-). David
-----Original Message-----
From: Tim Bunce [mailto:Tim.Bunce@xxxxxxxxx]
Sent: Thursday, June 07, 2007 6:55 AM
To: Wood, David
Cc: Tim Bunce; dbi-users@xxxxxxxx; mpeppler@xxxxxxxxxxx
Subject: Re: Incompatibility with DBI v1.56 / DBD::Sybase v1.08 /
DBIx::ContextualFetch v1.03
On Wed, Jun 06, 2007 at 07:45:45PM -0400, Wood, David wrote:
It took us a while to whittle this down into a small test case;however,
the fruits of labour seem to have paid off:1.
% perl -MDBI -e 'my $dbh =
DBI->connect("dbi:Sybase:server=MYSERVER","janedoe","janepass"); my
$arr_ref = $dbh->selectall_arrayref("execute sp_who"); print
@{$arr_ref->[0]},"\n";
Can't locate object method "DELETE" via package "DBI::st" at -e line
Excellent! Good small test cases lead to quick fixes...
The real bug here is an old one - almost 5 years old - in the DBI.
Here's a quick fix for DBD::Sybase 1.08 till DBI 1.57 is released:
--- dbdimp.c.orig 2007-04-19 11:31:19.000000000 -0700
+++ dbdimp.c 2007-06-07 03:40:57.000000000 -0700
@@ -3834,6 +3834,11 @@
return Nullav;
}
+ /* workaround for bug in DBI < 1.57: fetch was called with outer
*/
+ /* handle by XS versions of selectall_arrayref() etc.
*/
+ if (SvMAGICAL(SvRV(sth)) && mg_find(SvRV(sth),'P'))
+ sth = mg_find(SvRV(sth),'P')->mg_obj; /* switch to inner
handle */
+
ChopBlanks = DBIc_has(imp_sth, DBIcf_ChopBlanks);
TryAgain:
Tim.
.
- References:
- Prev by Date: Re: panic: DESTROY (dbih_clearcom) in trace output
- Next by Date: Re: panic: DESTROY (dbih_clearcom) in trace output
- Previous by thread: Re: Incompatibility with DBI v1.56 / DBD::Sybase v1.08 / DBIx::ContextualFetch v1.03
- Next by thread: BUG REPORT: Incorrect status information withexecute_for_fetch
- Index(es):