[Bast-commits] r6406 - in DBIx-Class/0.08/trunk: lib/DBIx/Class/Storage t

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Sun May 24 23:49:17 GMT 2009


Author: caelum
Date: 2009-05-24 23:49:17 +0000 (Sun, 24 May 2009)
New Revision: 6406

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
   DBIx-Class/0.08/trunk/t/746mssql.t
Log:
fix double connect for ODBC/MSSQL

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm	2009-05-24 20:53:15 UTC (rev 6405)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm	2009-05-24 23:49:17 UTC (rev 6406)
@@ -614,15 +614,15 @@
   my @info = @{$self->_dbi_connect_info || []};
   $self->_dbh($self->_connect(@info));
 
+  $self->_conn_pid($$);
+  $self->_conn_tid(threads->tid) if $INC{'threads.pm'};
+
   $self->_determine_driver;
 
   # Always set the transaction depth on connect, since
   #  there is no transaction in progress by definition
   $self->{transaction_depth} = $self->_dbh_autocommit ? 0 : 1;
 
-  $self->_conn_pid($$);
-  $self->_conn_tid(threads->tid) if $INC{'threads.pm'};
-
   my $connection_do = $self->on_connect_do;
   $self->_do_connection_actions($connection_do) if $connection_do;
 }

Modified: DBIx-Class/0.08/trunk/t/746mssql.t
===================================================================
--- DBIx-Class/0.08/trunk/t/746mssql.t	2009-05-24 20:53:15 UTC (rev 6405)
+++ DBIx-Class/0.08/trunk/t/746mssql.t	2009-05-24 23:49:17 UTC (rev 6406)
@@ -15,6 +15,7 @@
 my $schema = DBICTest::Schema->connect($dsn, $user, $pass, {AutoCommit => 1});
 
 $schema->storage->ensure_connected;
+
 isa_ok( $schema->storage, 'DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server' );
 
 $schema->storage->dbh_do (sub {




More information about the Bast-commits mailing list