X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FODBC%2FMicrosoft_SQL_Server.pm;h=3aa9b9bd7b6f1cb2f189c2bed70e8ae85cc108c5;hb=2b6d7e87bdf3f09e79cc19d209e52e78000f0578;hp=1b5fba2c31d43367ef8a413fc4616bec0509f201;hpb=796acb6af56d6943d694a356b7afe1909c620aca;p=dbsrgits%2FDBIx-Class.git 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 1b5fba2..3aa9b9b 100644 --- a/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm @@ -78,6 +78,10 @@ The following options are alternative ways to enable concurrent executing statement support. Each has its own advantages and drawbacks and works on different platforms. Read each section carefully. +For more details about using MAS in MSSQL over DBD::ODBC see this excellent +document provided by EasySoft: +L. + In order of preference, they are: =over 8 @@ -128,9 +132,8 @@ sub connect_call_use_mars { if ($dsn !~ /MARS_Connection=/) { if ($self->_using_freetds) { - 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; + $self->throw_exception('FreeTDS does not support MARS at the time of ' + .'writing.'); } if (exists $self->_server_info->{normalized_dbms_version} && @@ -212,6 +215,8 @@ sub connect_call_use_dynamic_cursors { sub _run_connection_actions { my $self = shift; + $self->next::method (@_); + # keep the dynamic_cursors_support and driver-state in sync # on every reconnect my $use_dyncursors = ($self->_dbic_connect_attributes->{odbc_cursortype} || 0) > 1; @@ -239,16 +244,17 @@ sub _run_connection_actions { $self->_using_dynamic_cursors(1); $self->_identity_method('@@identity'); - $self->_no_scope_identity_query($self->_using_freetds); } else { $self->_using_dynamic_cursors(0); $self->_identity_method(undef); - $self->_no_scope_identity_query(undef); } } - $self->next::method (@_); + $self->_no_scope_identity_query($self->_using_dynamic_cursors + ? $self->_using_freetds + : undef + ); # freetds is too damn broken, some fixups if ($self->_using_freetds) { @@ -265,7 +271,7 @@ sub _run_connection_actions { # FreeTDS is too broken wrt execute_for_fetch batching # just disable it outright until things quiet down - $self->_get_dbh->{odbc_disable_array_operations} = 1; + $self->_disable_odbc_array_ops; } }