[Bast-commits] r8598 - in
DBIx-Class/0.08/branches/storage-interbase:
lib/DBIx/Class/Storage/DBI lib/DBIx/Class/Storage/DBI/ODBC t
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Wed Feb 10 12:42:17 GMT 2010
Author: caelum
Date: 2010-02-10 12:42:17 +0000 (Wed, 10 Feb 2010)
New Revision: 8598
Modified:
DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/InterBase.pm
DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm
DBIx-Class/0.08/branches/storage-interbase/t/750firebird.t
Log:
turn on ib_softcommit, savepoint tests now pass for DBD::InterBase
Modified: DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/InterBase.pm
===================================================================
--- DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/InterBase.pm 2010-02-10 12:05:21 UTC (rev 8597)
+++ DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/InterBase.pm 2010-02-10 12:42:17 UTC (rev 8598)
@@ -163,6 +163,15 @@
}
}
+# softcommit makes savepoints work
+sub _run_connection_actions {
+ my $self = shift;
+
+ $self->_dbh->{ib_softcommit} = 1;
+
+ $self->next::method(@_);
+}
+
=head2 connect_call_datetime_setup
Used as:
Modified: DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm
===================================================================
--- DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm 2010-02-10 12:05:21 UTC (rev 8597)
+++ DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm 2010-02-10 12:42:17 UTC (rev 8598)
@@ -47,9 +47,15 @@
=head1 CAVEATS
+=over 4
+
+=item *
+
This driver (unlike L<DBD::InterBase>) does not currently support reading or
writing C<TIMESTAMP> values with sub-second precision.
+=back
+
=head1 AUTHOR
See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
Modified: DBIx-Class/0.08/branches/storage-interbase/t/750firebird.t
===================================================================
--- DBIx-Class/0.08/branches/storage-interbase/t/750firebird.t 2010-02-10 12:05:21 UTC (rev 8597)
+++ DBIx-Class/0.08/branches/storage-interbase/t/750firebird.t 2010-02-10 12:42:17 UTC (rev 8598)
@@ -68,22 +68,22 @@
ok($new->artistid, "Auto-PK worked");
# test savepoints
-# eval {
-# $schema->txn_do(sub {
-# eval {
-# $schema->txn_do(sub {
-# $ars->create({ name => 'in_savepoint' });
-# die "rolling back savepoint";
-# });
-# };
-# ok ((not $ars->search({ name => 'in_savepoint' })->first),
-# 'savepoint rolled back');
-# $ars->create({ name => 'in_outer_txn' });
-# die "rolling back outer txn";
-# });
-# };
-# ok ((not $ars->search({ name => 'in_outer_txn' })->first),
-# 'outer txn rolled back');
+ eval {
+ $schema->txn_do(sub {
+ eval {
+ $schema->txn_do(sub {
+ $ars->create({ name => 'in_savepoint' });
+ die "rolling back savepoint";
+ });
+ };
+ ok ((not $ars->search({ name => 'in_savepoint' })->first),
+ 'savepoint rolled back');
+ $ars->create({ name => 'in_outer_txn' });
+ die "rolling back outer txn";
+ });
+ };
+ ok ((not $ars->search({ name => 'in_outer_txn' })->first),
+ 'outer txn rolled back');
# test explicit key spec
$new = $ars->create ({ name => 'bar', artistid => 66 });
More information about the Bast-commits
mailing list