On 11/20/17, David Raymond <david.raym...@tomtom.com> wrote:
>
> To reproduce, download this database file (5.6MB, SHA1
> 12d1295d06327ee19ed2453517b0dd83233c6829, available for two days from now):
>
>    https://expirebox.com/download/328baafe26688579fccd55debfc54ad3.html
>
> This SQL returns a single result row with a value of 1:
>
> SELECT DISTINCT t2.a FROM t1
>   INNER JOIN t2 ON t1.t2_id = t2.id
>   WHERE t1.t2_id <> -1;
>
> Then run ANALYZE and run the above select again. This time I receive no
> result.

Thank you for the bug report.

To work around this problem, please DROP all indexes on the INTEGER
PRIMARY KEY columns.  Such indexes are accomplish nothing (they will
never be used on a real query - they are just slow down inserts and
updates and take up extra space on disk) except in this case they do
appear to be confusing the query planner.

This problem will be corrected in the next release.


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to