[Bast-commits] r7224 - in DBIx-Class/0.08/branches/reduce_pings: . lib/DBIx/Class/Storage

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Wed Aug 5 10:32:09 GMT 2009


Author: ribasushi
Date: 2009-08-05 10:32:09 +0000 (Wed, 05 Aug 2009)
New Revision: 7224

Modified:
   DBIx-Class/0.08/branches/reduce_pings/Changes
   DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm
Log:
Changes and a deploy() fix

Modified: DBIx-Class/0.08/branches/reduce_pings/Changes
===================================================================
--- DBIx-Class/0.08/branches/reduce_pings/Changes	2009-08-05 10:12:20 UTC (rev 7223)
+++ DBIx-Class/0.08/branches/reduce_pings/Changes	2009-08-05 10:32:09 UTC (rev 7224)
@@ -29,9 +29,13 @@
             problems with search_related chaining
           - Deal with the distinct => 1 attribute properly when using
             prefetch
+        - Massive optimization of the DBI storage layer - reduce the
+          amount of connected() calls
+        - New ::Storage::DBI method last_dbh() - it will still return a
+          newly connected $dbh if we start unconnected, but will not ping
+          the server on every invocation unlike dbh()
         - Multiple POD improvements
 
-
 0.08108 2009-07-05 23:15:00 (UTC)
         - Fixed the has_many prefetch with limit/group deficiency -
           it is now possible to select "top 5 commenters" while

Modified: DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm	2009-08-05 10:12:20 UTC (rev 7223)
+++ DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm	2009-08-05 10:32:09 UTC (rev 7224)
@@ -2310,7 +2310,10 @@
     return if $line =~ /^\s+$/; # skip whitespace only
     $self->_query_start($line);
     eval {
-      $self->last_dbh->do($line);
+      # a previous error may invalidate $dbh - thus we need to use dbh()
+      # to guarantee a healthy $dbh (this is temporary until we get
+      # proper error handling on deploy() )
+      $self->dbh->do($line);
     };
     if ($@) {
       carp qq{$@ (running "${line}")};




More information about the Bast-commits mailing list