[Bast-commits] r6902 - in DBIx-Class/0.08/trunk:
lib/DBIx/Class/Storage/DBI t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Jul 1 06:46:13 GMT 2009
Author: ribasushi
Date: 2009-07-01 06:46:12 +0000 (Wed, 01 Jul 2009)
New Revision: 6902
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/mysql.pm
DBIx-Class/0.08/trunk/t/zzzzzzz_sqlite_deadlock.t
Log:
Fixed deadlock test
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/mysql.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/mysql.pm 2009-07-01 04:03:12 UTC (rev 6901)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/mysql.pm 2009-07-01 06:46:12 UTC (rev 6902)
@@ -15,6 +15,12 @@
$self->dbh->do('SET foreign_key_checks=1');
}
+sub connect_call_set_ansi_mode {
+ my $self = shift;
+ $self->dbh->do(q|SET sql_mode = 'ANSI,TRADITIONAL'|);
+ $self->dbh->do(q|SET sql_mode = 'ANSI,TRADITIONAL'|);
+}
+
sub _dbh_last_insert_id {
my ($self, $dbh, $source, $col) = @_;
$dbh->{mysql_insertid};
Modified: DBIx-Class/0.08/trunk/t/zzzzzzz_sqlite_deadlock.t
===================================================================
--- DBIx-Class/0.08/trunk/t/zzzzzzz_sqlite_deadlock.t 2009-07-01 04:03:12 UTC (rev 6901)
+++ DBIx-Class/0.08/trunk/t/zzzzzzz_sqlite_deadlock.t 2009-07-01 06:46:12 UTC (rev 6902)
@@ -9,14 +9,18 @@
use DBICTest;
use DBICTest::Schema;
-plan skip_all => 'Fails on mac os *only*. Devs notified. Do not enable.';
-
plan tests => 2;
my $wait_for = 10; # how many seconds to wait
for my $close (0,1) {
- my $tmp = File::Temp->new( UNLINK => 1, TMPDIR => 1, SUFFIX => '.sqlite' );
+ my $tmp = File::Temp->new(
+ UNLINK => 1,
+ TMPDIR => 1,
+ SUFFIX => '.sqlite',
+ EXLOCK => 0, # important for BSD and derivatives
+ );
+
my $tmp_fn = $tmp->filename;
close $tmp if $close;
@@ -30,7 +34,7 @@
lives_ok (sub {
my $schema = DBICTest::Schema->connect ("DBI:SQLite:$tmp_fn");
DBICTest->deploy_schema ($schema);
- DBICTest->populate_schema ($schema);
+ #DBICTest->populate_schema ($schema);
});
alarm 0;
More information about the Bast-commits
mailing list