-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/02/2011 12:31 PM, Jay A. Kreibich wrote: > I suppose it would be technically correct to allow a LIMIT to 0, but > that seems like a highly questionable approach. Any parameter value > outside of 0 and 1 *is* non-sense and should be dutifully ignored > and/or corrected-- or the whole statement should be considered > invalid and an error thrown. > > While the phantom parameter issue might be worth addressing, in > this specific case I think it is fair to call the query incorrect.
The query used a binding to provide a limit of 1. If the binding is discarded then SQLite has no idea of what value was going to be provided, and hence had no idea if it was going to supply say 77 which is definitely incorrect. SQLite already has some functionality to help ensure queries aren't getting lucky. http://www.sqlite.org/pragma.html#pragma_reverse_unordered_selects Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk3oP5cACgkQmOOfHg372QTllQCfat1knfCR5zez1zuAxpplFPYk +qgAn2EHJfwf/RsUCwZwEcVF7cDUID1I =CxFJ -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users