diff options
author | drh <> | 2022-04-30 12:35:51 +0000 |
---|---|---|
committer | drh <> | 2022-04-30 12:35:51 +0000 |
commit | 2aa1086cab4e8a9cb239882ba1ba042dafdd7e7a (patch) | |
tree | 8ce4c1015d9d6719238fb0b0386e705ee8984d2d /src/wherecode.c | |
parent | a25bbaf74a697b0ba59d11a75fd78a349f3e581d (diff) | |
download | sqlite-2aa1086cab4e8a9cb239882ba1ba042dafdd7e7a.tar.gz sqlite-2aa1086cab4e8a9cb239882ba1ba042dafdd7e7a.zip |
Preserve the COLLATE operator on an index on an expression when resolving
the use of that expression into a reference to the index. See
[forum:/info/7efabf4b03328e57|forum thread 7efabf4b03328e57] for details.
FossilOrigin-Name: a8da85c57e07721dc1c918d67433d6c99ce48421e369123cc3194d855e55f7e8
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index 5e6852f55..0d6030793 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -1255,6 +1255,7 @@ static void preserveExpr(IdxExprTrans *pTrans, Expr *pExpr){ static int whereIndexExprTransNode(Walker *p, Expr *pExpr){ IdxExprTrans *pX = p->u.pIdxTrans; if( sqlite3ExprCompare(0, pExpr, pX->pIdxExpr, pX->iTabCur)==0 ){ + pExpr = sqlite3ExprSkipCollate(pExpr); preserveExpr(pX, pExpr); pExpr->affExpr = sqlite3ExprAffinity(pExpr); pExpr->op = TK_COLUMN; |