mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Retain the affinity of an expression in a WHERE clause when it is transformed to a reference to an index column on the same expression. Fix for [f043b113].
FossilOrigin-Name: 511da0815673ca4a176aa61dc23a8231b2ab77e8363fc184a78b6e17dba64d49
This commit is contained in:
@@ -1117,6 +1117,7 @@ typedef struct IdxExprTrans {
|
||||
static int whereIndexExprTransNode(Walker *p, Expr *pExpr){
|
||||
IdxExprTrans *pX = p->u.pIdxTrans;
|
||||
if( sqlite3ExprCompare(0, pExpr, pX->pIdxExpr, pX->iTabCur)==0 ){
|
||||
pExpr->affExpr = sqlite3ExprAffinity(pExpr);
|
||||
pExpr->op = TK_COLUMN;
|
||||
pExpr->iTable = pX->iIdxCur;
|
||||
pExpr->iColumn = pX->iIdxCol;
|
||||
|
||||
Reference in New Issue
Block a user