On Tue, Feb 25, 2014 at 1:11 PM, nobre <nobr...@gmail.com> wrote: > Hi! Given this schema: > > create table q (id integer primary key, idLevel integer); > create table level (id integer primary key); > > insert into q values(1, 1); > insert into q values(2, 1); > insert into q values(3, 1); > insert into level values(1); > > When running this query: > select p.* FROM > q as p > inner join level pn ON (p.idLevel = pn.id) > where p.idLevel = 1 > ORDER BY random() LIMIT 10 > > The results are not on random order on SQLite 3.8.0.2 > Verifying with EXPLAIN QUERY PLAN , it can be seen that no ORDER BY step is > included. > > if one of the following is changed: > LEFT join level instead of inner or the where clause condition is changed > to > p.idLevel >=1 and p.idLevel <= 1, the Order by step is included in the > query, and the result order is random as expected. > > Anything I'm missing ? >
Now fixed on trunk. http://www.sqlite.org/src/info/dca1945aeb -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users