disable batch ops for firebird ODBC driver
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / ODBC / Firebird.pm
index 9067290..24fe0b4 100644 (file)
@@ -33,6 +33,17 @@ makes it more suitable for long running processes such as under L<Catalyst>.
 
 __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 }