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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user