Re: [sqlite] Virtual Table BestIndex Being Passed LIKE constraints in SQLite 3.13.0?

2016-06-24 Thread Richard Hipp
On Sat, Jun 25, 2016 at 2:55 AM, Mike Nicolino
 wrote:
> Hey Everyone,
>
> I'm got a system with virtual tables using System.Data.SQLite 
> 1.0.102.0/SQLite version 3.13.0, the LIKE constraint for queries is now being 
> passed to the virtual table BestIndex functions (BestIndex is getting 65 as 
> its constraint.op).
>
> Is the behavior in 3.13.0 a bug or has something changed that now makes it 
> possible for the LIKE constraint to be sent to virtual tables?
>

This is a feature introduced in version 3.10.0.
https://www.sqlite.org/releaselog/3_10_0.html


-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Virtual Table BestIndex Being Passed LIKE constraints in SQLite 3.13.0?

2016-06-24 Thread Mike Nicolino
Hey Everyone,

I'm got a system with virtual tables using System.Data.SQLite 1.0.102.0/SQLite 
version 3.13.0, the LIKE constraint for queries is now being passed to the 
virtual table BestIndex functions (BestIndex is getting 65 as its 
constraint.op).  I had asked a question regarding LIKE constraints and virtual 
tables a while back and the response was that LIKE constraints were intended to 
never be passed to virtual table BestIndex due to LIKE being able to be 
overridden by the application (conversion pasted at end of this mail).

Is the behavior in 3.13.0 a bug or has something changed that now makes it 
possible for the LIKE constraint to be sent to virtual tables?

Thanks,
Mike Nicolino


On 3/5/15, Mike Nicolino  wrote:

> I'm using System.Data.SQLite version 1.0.95.0 and have what appears to

> be a bug with Virtual Tables.  Queries using 'like' in the where

> clause are not getting the like clause passed to BestIndex as a query 
> constraint.

> Specifically:

>

>

> -  Simple query: select * from foo where name like 'a%'



The LIKE operator can be overridden by the application to mean anything the 
application wants - it is not compelled to follow standard SQL semantics.  For 
that reason, virtual tables are unable to optimize using LIKE since they have 
no way of knowing what it will do.



Works as designed.



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