On 03/23/2012 03:59 PM, Kurt Keller wrote:
I have a virtual table implementation, that implements the
xBestIndex/xFilter funktions and I found the following problem:

This query

   SELECT * FROM vf WHERE field LIKE "F%";

will result in a call to xBestIndex with the following constraint

   field>= ... AND field<  ...

when SQLITE calls xFilter, the right hand values are delivered
correctly with

   field>= "F" AND field<  "g"  /* !! */

Thanks for reporting this.

This commit disables the LIKE optimization on virtual tables:

  http://www.sqlite.org/src/info/0bacb879e1

A workaround for earlier versions would be to define SQLITE_OMIT_LIKE_OPTIMIZATION when compiling.

Dan.

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

Reply via email to