Author: timbo
Date: Thu Apr 17 03:22:55 2008
New Revision: 11100

Modified:
   dbi/trunk/Changes
   dbi/trunk/Driver.xst

Log:
Fixed the selectall_arrayref, selectrow_arrayref, and selectrow_array
methods that get embedded into compiled drivers to use the
inner sth handle when passed a $sth instead of an sql string.


Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes   (original)
+++ dbi/trunk/Changes   Thu Apr 17 03:22:55 2008
@@ -40,6 +40,16 @@
 Call method on transport failure so transport can cleanup/reset if it wants
 Gofer: gearman - need to disable coallesing for non-idempotent requests
 
+
+Add high-res time for windows - via Time::HiRes glob replace dbi_time().
+
+=head2 Changes in DBI 1.605 XXX
+
+  Fixed the selectall_arrayref, selectrow_arrayref, and selectrow_array
+    methods that get embedded into compiled drivers to use the
+    inner sth handle when passed a $sth instead of an sql string.
+    Drivers will need to be recompiled to pick up this change.
+
 =head2 Changes in DBI 1.604 (svn rev 10994) 24th March 2008
 
   Fixed fetchall_arrayref with $max_rows argument broken in 1.603,

Modified: dbi/trunk/Driver.xst
==============================================================================
--- dbi/trunk/Driver.xst        (original)
+++ dbi/trunk/Driver.xst        Thu Apr 17 03:22:55 2008
@@ -119,7 +119,11 @@
     }
     /* --- prepare --- */
     if (SvROK(ST(1))) {
-       sth = ST(1);
+        MAGIC *mg;
+        sth = ST(1);
+        /* switch to inner handle if not already */
+        if ( (mg = mg_find(SvRV(sth),'P')) )
+            sth = mg->mg_obj;
     }
     else {
        sth = dbixst_bounce_method("prepare", 3);
@@ -157,7 +161,11 @@
     AV *row_av;
     PPCODE:
     if (SvROK(ST(1))) {
-       sth = ST(1);
+        MAGIC *mg;
+        sth = ST(1);
+        /* switch to inner handle if not already */
+        if ( (mg = mg_find(SvRV(sth),'P')) )
+            sth = mg->mg_obj;
     }
     else {
        /* --- prepare --- */

Reply via email to