File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ BEGIN {
151
151
152
152
# and do full populate() as well, just in case - shouldn't add new stuff
153
153
{
154
+ local $ENV {DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER };
154
155
require DBICTest;
155
156
my $s = DBICTest-> init_schema;
156
157
is ($s -> resultset(' Artist' )-> find(1)-> name, ' Caterwauler McCrae' );
Original file line number Diff line number Diff line change @@ -187,8 +187,14 @@ sub _database {
187
187
# no fsync on commit
188
188
$dbh -> do (' PRAGMA synchronous = OFF' );
189
189
190
- $dbh -> do (' PRAGMA reverse_unordered_selects = ON' )
191
- if $ENV {DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER };
190
+ if ($ENV {DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER }) {
191
+
192
+ $storage -> throw_exception(
193
+ ' PRAGMA reverse_unordered_selects does not work correctly before libsqlite 3.7.9'
194
+ ) if $storage -> _server_info-> {normalized_dbms_version } < 3.007009;
195
+
196
+ $dbh -> do (' PRAGMA reverse_unordered_selects = ON' );
197
+ }
192
198
193
199
# set a *DBI* disconnect callback, to make sure the physical SQLite
194
200
# file is still there (i.e. the test does not attempt to delete
You can’t perform that action at this time.
0 commit comments