On 2019/03/21 2:31 AM, Steve Horvath wrote:
I found an issue with SQLite 3.27.2 and is also existent in 3.20.1.

Of the four queries below, the second query should have returned the same
result set as the first query. As a side note, I also tried creating the
tables with no primary keys and got the same results. I also tried using
the "ON" syntax and got the same results.


"WHITE" refers to the column named "WHITE" while 'WHITE' would refer to the string of data 'White'. SQLite is very forgiving (for historical reasons) of mistakes like that so that if you pose the object id "WHTE" to the query planner and it doesn't find a column named "WHTE" it assumes you probably meant a string like 'whte', which is why your second example works.

We've been lobbying for an SQLite "Strict" mode which would never allow such shenanigans, but it's probably a rather huge undertaking.



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

Reply via email to