On 20 Jun 2010, at 11:08pm, Sam Carleton wrote:

> Simon,
> 
> this is a direct CUT and PASTE from my code:
> 
> #define SQL_GET_NEXT_SLIDE_SHOW_IMAGE \
>       "SELECT FolderId, ImageId, instertedon " \
>      "FROM V_FAVORITES_SELECTED " \
>     "WHERE instertedon > julianday(@time) AND findLargeImage(@path,
> FolderId, ImageId) = 1 " \
>     "LIMIT 1"
> 
> When I set a break point on the findLargeImage() function, it gets
> called once for every row in the result set from [SELECT FolderId,
> ImageId, instertedon FROM V_FAVORITES_SELECTED], the WHERE instertedon
>> 
>   > julianday(@time) and the LIMIT 1 is NOT taken into account.  Thus,
> the findLargeImage() is *NOT* short-circuiting the query.

Hmm.  That suggests that SQLite is not implementing LIMIT 1 in a good way.  
Perhaps someone could code up a trivial extension function with a breakpoint 
and debug it.

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

Reply via email to