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 <mike.nicol...@centrify.com> 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

Reply via email to