Author: mjevans
Date: Tue Dec 14 07:23:58 2010
New Revision: 14568

Modified:
   dbi/trunk/Changes
   dbi/trunk/DBI.pm

Log:
Document drivers which avoid creating a statement in do and the effects


Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes   (original)
+++ dbi/trunk/Changes   Tue Dec 14 07:23:58 2010
@@ -9,6 +9,8 @@
 =head2 Changes in DBI 1.617 (svn rXXX) XXX
 
   Fixed typo in InactiveDestroy thanks to Emmanuel Rodriguez.
+  Added additional notes on DBDs which avoid creating a statement in
+    the do method and the effects on error handlers (Martin J. Evans)
 
 =head2 Changes in DBI 1.616 (svn r14486) 15th October 2010
 

Modified: dbi/trunk/DBI.pm
==============================================================================
--- dbi/trunk/DBI.pm    (original)
+++ dbi/trunk/DBI.pm    Tue Dec 14 07:23:58 2010
@@ -4394,6 +4394,11 @@
 C<qq{...}> operator if you want to interpolate variables into the string.
 See L<perlop/"Quote and Quote-like Operators"> for more details.
 
+Note drivers are free to avoid the overhead of creating an DBI
+statement handle for do(), especially if there are no parameters. In
+this case error handlers, if invoked during do(), will be passed the
+database handle.
+
 =head3 C<last_insert_id>
 
   $rv = $dbh->last_insert_id($catalog, $schema, $table, $field);
@@ -5829,10 +5834,11 @@
 
 Type: string, read-only
 
-Returns the statement string passed to the most recent L</prepare> method
-called in this database handle, even if that method failed. This is especially
-useful where C<RaiseError> is enabled and the exception handler checks $@
-and sees that a 'prepare' method call failed.
+Returns the statement string passed to the most recent L</prepare> or
+L</do> method called in this database handle, even if that method
+failed. This is especially useful where C<RaiseError> is enabled and
+the exception handler checks $@ and sees that a 'prepare' method call
+failed.
 
 
 =head3 C<RowCacheSize>

Reply via email to