Author: timbo
Date: Thu Jun 7 05:56:24 2007
New Revision: 9631
Modified:
dbi/trunk/Changes
dbi/trunk/Driver.xst
dbi/trunk/t/86gofer_fail.t
Log:
Fixed XS versions of select*_*() methods to call execute() fetch() etc., with
inner handle instead of outer.
Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes (original)
+++ dbi/trunk/Changes Thu Jun 7 05:56:24 2007
@@ -41,6 +41,8 @@
XXX Add a DBI_REVISION macro that drivers can use
+ Fixed XS versions of select*_*() methods to call execute()
+ fetch() etc., with inner handle instead of outer.
Fixed unused var compiler warning thanks to JDHEDDEN.
Corrected timeout example in docs thanks to Egmont Koblinger.
Modified: dbi/trunk/Driver.xst
==============================================================================
--- dbi/trunk/Driver.xst (original)
+++ dbi/trunk/Driver.xst Thu Jun 7 05:56:24 2007
@@ -124,6 +124,8 @@
SPAGAIN; SP -= items; /* because stack might have been realloc'd */
if (!SvROK(sth))
XSRETURN_UNDEF;
+ /* switch to inner handle */
+ sth = mg_find(SvRV(sth),'P')->mg_obj;
}
imp_sth = (imp_sth_t*)(DBIh_COM(sth));
/* --- bind_param --- */
@@ -162,6 +164,8 @@
if (!SvROK(sth)) {
if (is_selectrow_array) { XSRETURN_EMPTY; } else { XSRETURN_UNDEF; }
}
+ /* switch to inner handle */
+ sth = mg_find(SvRV(sth),'P')->mg_obj;
}
imp_sth = (imp_sth_t*)(DBIh_COM(sth));
/* --- bind_param --- */
Modified: dbi/trunk/t/86gofer_fail.t
==============================================================================
--- dbi/trunk/t/86gofer_fail.t (original)
+++ dbi/trunk/t/86gofer_fail.t Thu Jun 7 05:56:24 2007
@@ -111,10 +111,10 @@
$ENV{DBI_GOFER_RANDOM} = "delay0.1=51%,do"; # odd percentage to force warn()s
@warns = ();
ok my $dbh = dbi_connect("policy=rush;retry_limit=0");
-is precentage_exceptions(10, sub { $dbh->do("set foo=1") }),
+is precentage_exceptions(20, sub { $dbh->do("set foo=1") }),
0, "should not fail for DBI_GOFER_RANDOM='$ENV{DBI_GOFER_RANDOM}'";
my $delays = grep { m/delaying execution/ } @warns;
-between_ok $delays, 2, 9, 'should be delayed around 5 times';
+between_ok $delays, 2, 19, 'should be delayed around 5 times';
exit 0;