From: Rafael Kitover Date: Wed, 10 Feb 2010 22:38:24 +0000 (+0000) Subject: fix savepoints for Firebird ODBC X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c6ed0b5ed39c7356e36f056b98ae92e8bcdb7bb;p=dbsrgits%2FDBIx-Class-Historic.git fix savepoints for Firebird ODBC --- diff --git a/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm b/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm index 11af658..e143b5b 100644 --- a/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm +++ b/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm @@ -43,6 +43,9 @@ sub _init { 1 } # ODBC uses dialect 3 by default, good sub _set_sql_dialect { 1 } +# releasing savepoints doesn't work, but that shouldn't matter +sub _svp_release { 1 } + 1; =head1 CAVEATS @@ -54,6 +57,11 @@ sub _set_sql_dialect { 1 } This driver (unlike L) does not currently support reading or writing C values with sub-second precision. +=item * + +Releasing savepoints does not work, but you should still be able to safely use +savepoints. + =back =head1 AUTHOR diff --git a/t/750firebird.t b/t/750firebird.t index 49f30c9..a1f9807 100644 --- a/t/750firebird.t +++ b/t/750firebird.t @@ -24,7 +24,7 @@ my @info = ( my $schema; -foreach my $conn_idx (0..1) { +foreach my $conn_idx (0..$#info) { my ($dsn, $user, $pass) = @{ $info[$conn_idx] || [] }; next unless $dsn; @@ -82,6 +82,10 @@ EOF die "rolling back outer txn"; }); }; + + like $@, qr/rolling back outer txn/, + 'correct exception for rollback'; + ok ((not $ars->search({ name => 'in_outer_txn' })->first), 'outer txn rolled back');