From: Rafael Kitover Date: Thu, 22 Mar 2012 11:41:47 +0000 (-0400) Subject: As shitty as freetds is, it seems they at least got MARS right X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=796acb6a;p=dbsrgits%2FDBIx-Class-Historic.git As shitty as freetds is, it seems they at least got MARS right --- diff --git a/Changes b/Changes index 44a5264..058537f 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,7 @@ Revision history for DBIx::Class unique constraint - dbicadmin now better supports catalyst-style config files, by unrolling 'config_info' hashkeys + - MSSQL MARS over DBD::ODBC now works with freetds >= 0.91 * Fixes - Fix SkipFirst and FirstSkip limit dialects (Informix and Firebird) diff --git a/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm b/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm index c11634d..1b5fba2 100644 --- a/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm @@ -128,8 +128,9 @@ sub connect_call_use_mars { if ($dsn !~ /MARS_Connection=/) { if ($self->_using_freetds) { - $self->throw_exception('FreeTDS does not support MARS at the time of ' - .'writing.'); + my $v = $self->_using_freetds_version; + $self->throw_exception("FreeTDS 0.91 or later required for MARS support, you have $v") + if $v < 0.91; } if (exists $self->_server_info->{normalized_dbms_version} &&