diff options
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/expr.c b/src/expr.c index 3141cd9db..b52e814f3 100644 --- a/src/expr.c +++ b/src/expr.c @@ -2443,15 +2443,15 @@ void sqlite3ExprCodeLoadIndexColumn( int regOut /* Store the index column value in this register */ ){ i16 iTabCol = pIdx->aiColumn[iIdxCol]; - if( iTabCol>=(-1) ){ + if( iTabCol==XN_EXPR ){ + assert( pIdx->aColExpr ); + assert( pIdx->aColExpr->nExpr>iIdxCol ); + pParse->iSelfTab = iTabCur; + sqlite3ExprCode(pParse, pIdx->aColExpr->a[iIdxCol].pExpr, regOut); + }else{ sqlite3ExprCodeGetColumnOfTable(pParse->pVdbe, pIdx->pTable, iTabCur, iTabCol, regOut); - return; } - assert( pIdx->aColExpr ); - assert( pIdx->aColExpr->nExpr>iIdxCol ); - pParse->iSelfTab = iTabCur; - sqlite3ExprCode(pParse, pIdx->aColExpr->a[iIdxCol].pExpr, regOut); } /* |