Author: REHSACK
Date: Tue Dec 14 13:34:51 2010
New Revision: 14572

Added:
   dbi/branches/sqlengine/xt/
      - copied from r14571, /dbi/trunk/xt/
   dbi/branches/sqlengine/xt/README
      - copied unchanged from r14571, /dbi/trunk/xt/README
   dbi/branches/sqlengine/xt/dbixha-goperf.pl
      - copied unchanged from r14571, /dbi/trunk/xt/dbixha-goperf.pl
   dbi/branches/sqlengine/xt/goferdemo.pl
      - copied unchanged from r14571, /dbi/trunk/xt/goferdemo.pl
   dbi/branches/sqlengine/xt/leak.pl
      - copied unchanged from r14571, /dbi/trunk/xt/leak.pl
   dbi/branches/sqlengine/xt/tests.pl
      - copied unchanged from r14571, /dbi/trunk/xt/tests.pl
Modified:
   dbi/branches/sqlengine/   (props changed)
   dbi/branches/sqlengine/Changes
   dbi/branches/sqlengine/DBI.pm
   dbi/branches/sqlengine/DBI.xs
   dbi/branches/sqlengine/dbixs_rev.h
   dbi/branches/sqlengine/lib/DBD/Gofer/Transport/stream.pm
   dbi/branches/sqlengine/lib/DBD/NullP.pm
   dbi/branches/sqlengine/lib/DBI/DBD.pm

Log:
Merging r14476 through r14571 into '.'


Modified: dbi/branches/sqlengine/Changes
==============================================================================
--- dbi/branches/sqlengine/Changes      (original)
+++ dbi/branches/sqlengine/Changes      Tue Dec 14 13:34:51 2010
@@ -6,11 +6,13 @@
 
 =cut
 
-=head2 Changes in DBI 1.616 (svn rNNN) XXX
-
-  Fixed RT#61513 by catching attribute assignment to tied table access
-    interface (Jens Rehsack)
+=head2 Changes in DBI 1.616 (svn r14486) 15th October 2010
 
+  Documented dbd_st_execute return (Martin J. Evans)
+  Fixed spurious dbi_profile lines written to the log when
+    profiling is enabled and a trace flag, like SQL, is used.
+  Fixed to recognize SQL::Statement errors even if instantiated
+    with RaiseError=0 (Jens Rehsack)
   Optimized connect() to remove redundant FETCH of \%attrib values.
   Adding fix to recognize SQL::Statement errors even if instantiated
     with RaiseError=0 (Jens Rehsack)
@@ -19,6 +21,12 @@
     CSV (Jens Rehsack)
   Improve initialization phases in DBI::DBD::SqlEngine (Jens Rehsack)
   Add documentation for DBI::DBD::SqlEngine attributes (Jens Rehsack)
+  Fixed RT#61513 by catching attribute assignment to tied table access
+    interface (Jens Rehsack)
+
+  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.615 (svn r14438) 21st September 2010
 

Modified: dbi/branches/sqlengine/DBI.pm
==============================================================================
--- dbi/branches/sqlengine/DBI.pm       (original)
+++ dbi/branches/sqlengine/DBI.pm       Tue Dec 14 13:34:51 2010
@@ -9,7 +9,7 @@
 require 5.008_001;
 
 BEGIN {
-$DBI::VERSION = "1.615"; # ==> ALSO update the version in the pod text below!
+$DBI::VERSION = "1.616"; # ==> ALSO update the version in the pod text below!
 }
 
 =head1 NAME
@@ -124,7 +124,7 @@
 
 =head2 NOTES
 
-This is the DBI specification that corresponds to the DBI version 1.615
+This is the DBI specification that corresponds to the DBI version 1.616
 ($Revision$).
 
 The DBI is evolving at a steady pace, so it's good to check that
@@ -2512,6 +2512,7 @@
   Sybase           Y  N  N  N  N  N  Y
   AnyData,DBM,CSV  Y  N  N  N  Y  Y* Y
   SQLite 3.3       N  N  N  N  Y  N  N
+  MSAccess         N  N  N  N  Y  N  Y
 
 * Works only because Example 0 works.
 
@@ -3629,7 +3630,7 @@
 This attribute is specifically designed for use in Unix applications
 that "fork" child processes.  For some drivers, when the child process exits
 the destruction of inherited handles cause the corresponding handles in the
-perent process to cease working.
+parent process to cease working.
 
 Either the parent or the child process, but not both, should set
 C<InactiveDestroy> true on all their shared handles. Alternatively the
@@ -4393,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);
@@ -5828,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>

Modified: dbi/branches/sqlengine/DBI.xs
==============================================================================
--- dbi/branches/sqlengine/DBI.xs       (original)
+++ dbi/branches/sqlengine/DBI.xs       Tue Dec 14 13:34:51 2010
@@ -2673,7 +2673,7 @@
     }
     statement_pv = SvPV_nolen(statement_sv);
 
-    if (DBIc_DBISTATE(imp_xxh)->debug >= 4)
+    if (DBIc_TRACE_LEVEL(imp_xxh) >= 4)
         PerlIO_printf(DBIc_LOGPIO(imp_xxh), "       dbi_profile +%" NVff "s %s 
%s\n",
             ti, method_pv, neatsvpv(statement_sv,0));
 
@@ -3088,11 +3088,12 @@
 
 #ifdef DBI_USE_THREADS
 {
-    PerlInterpreter * h_perl = DBIc_THR_USER(imp_xxh) ;
+    PerlInterpreter * h_perl;
+    is_DESTROY_wrong_thread:
+    h_perl = DBIc_THR_USER(imp_xxh) ;
     if (h_perl != my_perl) {
         /* XXX could call a 'handle clone' method here?, for dbh's at least */
         if (is_DESTROY) {
-    is_DESTROY_wrong_thread:
             if (trace_level >= 3) {
                 PerlIO_printf(DBILOGFP,"    DESTROY ignored because DBI %sh 
handle (%s) is owned by thread %p not current thread %p\n",
                       dbih_htype_name(DBIc_TYPE(imp_xxh)), 
HvNAME(DBIc_IMP_STASH(imp_xxh)),
@@ -5053,7 +5054,7 @@
     /* we don't test IMPSET here because this code applies to pure-perl 
drivers */
     if (DBIc_IADESTROY(imp_sth)) { /* want's ineffective destroy    */
         DBIc_ACTIVE_off(imp_sth);
-        if (DBIc_DBISTATE(imp_sth)->debug)
+        if (DBIc_TRACE_LEVEL(imp_sth))
                 PerlIO_printf(DBIc_LOGPIO(imp_sth), "         DESTROY %s 
skipped due to InactiveDestroy\n", SvPV_nolen(sth));
     }
     if (DBIc_ACTIVE(imp_sth)) {

Modified: dbi/branches/sqlengine/dbixs_rev.h
==============================================================================
--- dbi/branches/sqlengine/dbixs_rev.h  (original)
+++ dbi/branches/sqlengine/dbixs_rev.h  Tue Dec 14 13:34:51 2010
@@ -1,2 +1,4 @@
-/* Mon Aug 30 20:49:00 2010 */
-#define DBIXS_REVISION 14354
+/* Tue Dec 14 22:26:28 2010 */
+/* Mixed revision working copy (14564M:14571) */
+/* Code modified since last checkin */
+#define DBIXS_REVISION 14564

Modified: dbi/branches/sqlengine/lib/DBD/Gofer/Transport/stream.pm
==============================================================================
--- dbi/branches/sqlengine/lib/DBD/Gofer/Transport/stream.pm    (original)
+++ dbi/branches/sqlengine/lib/DBD/Gofer/Transport/stream.pm    Tue Dec 14 
13:34:51 2010
@@ -127,7 +127,7 @@
 
     # send frozen request
     local $\;
-    print $wfh $encoded_request # autoflush enabled
+    $wfh->print($encoded_request) # autoflush enabled
         or do {
             # XXX should make new connection and retry
             $self->_connection_kill;

Modified: dbi/branches/sqlengine/lib/DBD/NullP.pm
==============================================================================
--- dbi/branches/sqlengine/lib/DBD/NullP.pm     (original)
+++ dbi/branches/sqlengine/lib/DBD/NullP.pm     Tue Dec 14 13:34:51 2010
@@ -118,6 +118,15 @@
             $sth->{dbd_nullp_data} = [ @{$params}{ sort keys %$params } ];
             $sth->STORE(Active => 1); 
         }
+        elsif ($sth->{Statement} =~ m/^ \s* SLEEP \s+ (\S+) /xmsi) {
+            my $secs = $1;
+            if (eval { require Time::HiRes; defined &Time::HiRes::sleep }) {
+                Time::HiRes::sleep($secs);
+            }
+            else {
+                sleep $secs;
+            }
+        }
        1;
     }
 

Modified: dbi/branches/sqlengine/lib/DBI/DBD.pm
==============================================================================
--- dbi/branches/sqlengine/lib/DBI/DBD.pm       (original)
+++ dbi/branches/sqlengine/lib/DBI/DBD.pm       Tue Dec 14 13:34:51 2010
@@ -2308,6 +2308,10 @@
 
   int dbd_st_execute(SV* sth, imp_sth_t* imp_sth);
 
+C<dbd_st_execute> should return -2 for any error, -1 if the number of
+rows affected is unknown else it should be the number of affected
+(updated, inserted) rows.
+
 Note that you must be aware a statement may be executed repeatedly.
 Also, you should not expect that C<finish()> will be called between two
 executions, so you might need code, like the following, near the start

Reply via email to