From: Rafael Kitover Date: Fri, 23 Mar 2012 18:27:10 +0000 (-0400) Subject: disable batch ops for firebird ODBC driver X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3edfebff056f798162945fcacb06486fa3ee99ef;p=dbsrgits%2FDBIx-Class-Historic.git disable batch ops for firebird ODBC driver --- diff --git a/Changes b/Changes index 804b235..20d3d29 100644 --- a/Changes +++ b/Changes @@ -26,8 +26,9 @@ Revision history for DBIx::Class - Improve identity/autoinc retrieval code in MSSQL and Sybase - should reduce weird side-effects especially with populate() - Explicitly disable DBD::ODBC batch operations (as of DBD::ODBC 1.35) - when using freetds - the freetds driver is just too buggy to handle - the optimized path + for the following drivers too buggy to handle the optimized path: + - FreeTDS ODBC driver (when used with MSSQL) + - The Firebird ODBC driver - Explicitly disable DBD::ODBC dynamic_cursors when using freetds 0.83 or later - they made enough ODBC incompatible changes making it impossible to support sanely diff --git a/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm b/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm index 9067290..24fe0b4 100644 --- a/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm +++ b/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm @@ -33,6 +33,17 @@ makes it more suitable for long running processes such as under L. __PACKAGE__->datetime_parser_type ('DBIx::Class::Storage::DBI::ODBC::Firebird::DateTime::Format'); +# batch operations in DBD::ODBC 1.35 do not work with the official ODBC driver +sub _init { + my $self = shift; + + $self->next::method(@_); + + if ($self->_dbh_get_info('SQL_DRIVER_NAME') eq 'OdbcFb') { + $self->_get_dbh->{odbc_disable_array_operations} = 1; + } +} + # releasing savepoints doesn't work for some reason, but that shouldn't matter sub _exec_svp_release { 1 }