[Bast-commits] r7051 -
DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/ODBC
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Tue Jul 14 22:14:09 GMT 2009
Author: caelum
Date: 2009-07-14 22:14:09 +0000 (Tue, 14 Jul 2009)
New Revision: 7051
Modified:
DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm
Log:
unfuck ensure_connected for odbc/mssql
Modified: DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm
===================================================================
--- DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm 2009-07-14 17:50:28 UTC (rev 7050)
+++ DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm 2009-07-14 22:14:09 UTC (rev 7051)
@@ -77,8 +77,9 @@
if (not exists $dbi_attrs->{odbc_cursortype}) {
# turn on support for multiple concurrent statements, unless overridden
$self->_dbi_connect_info->[-1] = { %$dbi_attrs, odbc_cursortype => 2 };
- # will take effect next connection
+ my $connected = defined $self->_dbh;
$self->disconnect;
+ $self->ensure_connected if $connected;
$self->_using_dynamic_cursors(1);
}
}
@@ -138,8 +139,9 @@
if ($dsn !~ /MARS_Connection=/) {
$self->_dbi_connect_info->[0] = "$dsn;MARS_Connection=Yes";
- # will take effect next connection
+ my $connected = defined $self->_dbh;
$self->disconnect;
+ $self->ensure_connected if $connected;
}
}
More information about the Bast-commits
mailing list