Limit2 is taken to be the alias of table foo. -----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Robert Cousins Gesendet: Sonntag, 18. Juni 2017 21:19 An: sqlite-users@mailinglists.sqlite.org Betreff: [sqlite] unusual but trivially reproducible bug
Summary: Leaving out the space after the word 'limit' causes the limit clause to be ignored. I've reproduced it on version 3.19.2 2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9 A sample output is below. On one hand, this is a failure to catch a syntax error. On the other hand, the fact that it isn't caught is perhaps problematic and indicates an underlying parser issue. Thanx sqlite> create table foo(id Integer not null primary key, bar int); sqlite> insert into foo values (NULL,1),(NULL,2),(NULL,3); select * from sqlite> foo limit1; id bar ---------- ---------- 1 1 2 2 3 3 sqlite> select * from foo limit2; id bar ---------- ---------- 1 1 2 2 3 3 sqlite> select * from foo limit 1; id bar ---------- ---------- 1 1 sqlite> select * from foo limit 2; id bar ---------- ---------- 1 1 2 2 sqlite> _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick Software Engineer Scientific Games International GmbH FN 157284 a, HG Wien Klitschgasse 2-4, A-1130 Vienna, Austria Tel: +43 1 80100 0 E-Mail: h...@scigames.at This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users