I am presenting a scenario where a SELECT produces a different result after running ANALYZE.

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.

Assuming that SQL SELECTs should always return the same results regardless of optimization, I assume that this might be a bug in SQLite.

Tested with the SQLite 3.21.0 CLI on Windows.

Ralf
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to