[Bast-commits] r7572 - in DBIx-Class/0.08/branches/sybase: lib/DBIx/Class/Storage/DBI t

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Sat Sep 5 05:23:58 GMT 2009


Author: caelum
Date: 2009-09-05 05:23:57 +0000 (Sat, 05 Sep 2009)
New Revision: 7572

Modified:
   DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
   DBIx-Class/0.08/branches/sybase/t/746sybase.t
Log:
pending review by mpeppler

Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm	2009-09-04 19:49:54 UTC (rev 7571)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm	2009-09-05 05:23:57 UTC (rev 7572)
@@ -12,7 +12,7 @@
 use List::Util ();
 
 __PACKAGE__->mk_group_accessors('simple' =>
-    qw/_identity _blob_log_on_update unsafe_insert/
+    qw/_identity _blob_log_on_update unsafe_insert _insert_dbh/
 );
 
 =head1 NAME
@@ -129,6 +129,8 @@
       $self->_dbh->do('SET CHAINED ON');
     }
   }
+
+  $self->_insert_dbh($self->_connect(@{ $self->_dbi_connect_info }));
 }
 
 =head2 connect_call_blob_setup
@@ -258,7 +260,7 @@
   my ($self, $type) = @_;
 
   $type = lc $type;
-  $type =~ s/ identity//;
+  $type =~ s/\s* identity//x;
 
   return uc($TYPE_MAPPING{$type} || $type);
 }
@@ -312,6 +314,7 @@
     if (
       $need_last_insert_id && !$self->unsafe_insert && !$self->{transaction_depth}
     ) {
+      local $self->{_dbh} = $self->_insert_dbh;
       my $guard = $self->txn_scope_guard;
       my $upd_cols = $self->next::method (@_);
       $guard->commit;

Modified: DBIx-Class/0.08/branches/sybase/t/746sybase.t
===================================================================
--- DBIx-Class/0.08/branches/sybase/t/746sybase.t	2009-09-04 19:49:54 UTC (rev 7571)
+++ DBIx-Class/0.08/branches/sybase/t/746sybase.t	2009-09-05 05:23:57 UTC (rev 7572)
@@ -307,9 +307,9 @@
 SQL
   });
 
-# test insert transactions when there's an active cursor
+# test insert transaction when there's an active cursor
   TODO: { 
-    local $TODO = 'not supported yet or possibly ever';
+#    local $TODO = 'not supported yet or possibly ever';
 
     SKIP: {
       skip 'not testing insert with active cursor if using unsafe_insert', 1




More information about the Bast-commits mailing list