As shitty as freetds is, it seems they at least got MARS right
Rafael Kitover [Thu, 22 Mar 2012 11:41:47 +0000 (07:41 -0400)]
Changes
lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm

diff --git a/Changes b/Changes
index 44a5264..058537f 100644 (file)
--- 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)
index c11634d..1b5fba2 100644 (file)
@@ -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} &&