On Jul 3, 2012, at 11:03 PM, Bart Smissaert wrote:

> OK, thanks, that confirms my suspicion then.


PRAGMA reverse_unordered_selects = boolean;

When enabled, this PRAGMA causes SELECT statements without an ORDER BY clause 
to emit their results in the reverse order of what they normally would. This 
can help debug applications that are making invalid assumptions about the 
result order.

SQLite makes no guarantees about the order of results if a SELECT omits the 
ORDER BY clause. Even so, the order of results does not change from one run to 
the next, and so many applications mistakenly come to depend on the arbitrary 
output order whatever that order happens to be. However, sometimes new versions 
of SQLite will contain optimizer enhancements that will cause the output order 
of queries without ORDER BY clauses to shift. When that happens, applications 
that depend on a certain output order might malfunction. By running the 
application multiple times with this pragma both disabled and enabled, cases 
where the application makes faulty assumptions about output order can be 
identified and fixed early, reducing problems that might be caused by linking 
against a different version of SQLite.

http://www.sqlite.org/pragma.html#pragma_reverse_unordered_selects

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to