1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-22 20:22:44 +03:00

Disable the LIKE optimization if the column on the left-hand-side of the LIKE operator belongs to a virtual table.

FossilOrigin-Name: 0bacb879e18026f2a8e22fe3e4bc8d27de5c4416
This commit is contained in:
dan
2012-03-29 14:29:07 +00:00
parent 9ace112c84
commit c68939ef3e
4 changed files with 68 additions and 9 deletions

View File

@@ -686,7 +686,10 @@ static int isLikeOrGlob(
#endif
pList = pExpr->x.pList;
pLeft = pList->a[1].pExpr;
if( pLeft->op!=TK_COLUMN || sqlite3ExprAffinity(pLeft)!=SQLITE_AFF_TEXT ){
if( pLeft->op!=TK_COLUMN
|| sqlite3ExprAffinity(pLeft)!=SQLITE_AFF_TEXT
|| IsVirtual(pLeft->pTab)
){
/* IMP: R-02065-49465 The left-hand side of the LIKE or GLOB operator must
** be the name of an indexed column with TEXT affinity. */
return 0;