In some circumstances "DELETE FROM x WHERE col = val" may fail to delete all rows?if?"PRAGMA reverse_unordered_selects = true;" has been executed.
Steps to repro: Open the test DB (https://downloads.logoscdn.com/temp/test.db 40KB)?with SQLite 3.12.1 Run: pragma reverse_unordered_selects = true; delete from ids where fk = 'DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'; select * from ids where fk = 'DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'; Expected Behaviour: No rows returned. Actual Behaviour:?SQLite returns the row: 79|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD Example: C:\>sqlite3 test.db SQLite version 3.12.1 2016-04-08 15:09:49 Enter ".help" for usage hints. sqlite> pragma reverse_unordered_selects = true; sqlite> delete from ids where fk = 'DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'; sqlite> select * from ids where fk = 'DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'; 79|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD SQLite> I have reproed this with SQLite 3.12.1 on Windows 10 x64 and Mac OS X 10.10. I wasn't able to repro (using this file) with SQLite 3.8.11.1, but I could with SQLite 3.9.0 (on Mac OS X 10.10).