X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest.pm;h=42a691b47e42d84c30858b5f876000f6213bab4d;hb=13d62aacb09da7b2acbd79a1a66b3e96ef245447;hp=f95c8e789cd2c9586dcc3b3d9757ccce635c1367;hpb=fb88ca2c952ef2e17f6e8a414079f12f71761ff7;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index f95c8e7..42a691b 100644 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -187,8 +187,14 @@ sub _database { # no fsync on commit $dbh->do ('PRAGMA synchronous = OFF'); - $dbh->do ('PRAGMA reverse_unordered_selects = ON') - if $ENV{DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER}; + if ($ENV{DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER}) { + + $storage->throw_exception( + 'PRAGMA reverse_unordered_selects does not work correctly before libsqlite 3.7.9' + ) if $storage->_server_info->{normalized_dbms_version} < 3.007009; + + $dbh->do ('PRAGMA reverse_unordered_selects = ON'); + } # set a *DBI* disconnect callback, to make sure the physical SQLite # file is still there (i.e. the test does not attempt to delete