-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/02/2011 01:18 AM, Dagdamor wrote:
> Patrick Earl <pate...@patearl.net> писал(а) в своём письме Wed, 01 Jun 2011 
> 22:24:10 +0600:
> 
>>  Is there another work-around?
> 
> Yes. Do not feed SQLite with stupid queries. ;)

The query was actually correct and not stupid in any way.

> If, according to SQLite standards, LIMIT shouldn't be specified in that 
> subquery, then you shouldn't use it.

SQLite was actually in error IMHO.  The subquery is the right hand side of
an equality and SQLite was looking for a single row/value.  The query
generation code specifically added a LIMIT to ensure that only one row was
produced.  SQLite ignored the LIMIT and hard coded the value one.  This
"optimisation" resulted in the binding specifying that limit to be optimized
out causing the whole problem.

> Remember, it's you who should write essential and good queries, not SQLite 
> should do that for you.

Remember, it's you who may not understand the issue in the first place with
SQLite arguably doing the wrong thing with good queries :-)

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk3n1rQACgkQmOOfHg372QRTZwCfQQ4KE8mU7OVeM/FL6hWIXwRR
BFcAn1Nj03RTF9j8scOa0IAYo49Ehfy8
=/9tF
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to