diff options
author | drh <drh@noemail.net> | 2015-09-30 14:50:39 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-09-30 14:50:39 +0000 |
commit | 32af5eda6a6bd8afaad724fa61166ee92f935af5 (patch) | |
tree | ddf5f23f29daccf300fa9d0188a7a766dfcd560e /src/wherecode.c | |
parent | 9ec0efd946b8015f8b3ba3b726bc39f0b15d306c (diff) | |
parent | 105865acf9644a66cc73a84dde72937b83dd5315 (diff) | |
download | sqlite-32af5eda6a6bd8afaad724fa61166ee92f935af5.tar.gz sqlite-32af5eda6a6bd8afaad724fa61166ee92f935af5.zip |
Merge recent enhancements from trunk, and especially the fix for
ticket [1b266395d6bc10].
FossilOrigin-Name: b2face9aa95ade96a5666c70b6b31064c1ad0977
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index 77b8be4be..a6c45f032 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -46,8 +46,8 @@ static void explainAppendTerm( */ static const char *explainIndexColumnName(Index *pIdx, int i){ i = pIdx->aiColumn[i]; - if( i==(-2) ) return "<expr>"; - if( i==(-1) ) return "rowid"; + if( i==XN_EXPR ) return "<expr>"; + if( i==XN_ROWID ) return "rowid"; return pIdx->pTable->aCol[i].zName; } @@ -514,7 +514,7 @@ static int codeAllEqualityTerms( sqlite3VdbeJumpHere(v, j); for(j=0; j<nSkip; j++){ sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, j, regBase+j); - testcase( pIdx->aiColumn[j]==(-2) ); + testcase( pIdx->aiColumn[j]==XN_EXPR ); VdbeComment((v, "%s", explainIndexColumnName(pIdx, j))); } } @@ -700,8 +700,8 @@ Bitmask sqlite3WhereCodeOneLoopStart( disableTerm(pLevel, pLoop->aLTerm[j]); } } - pLevel->op = OP_VNext; pLevel->p1 = iCur; + pLevel->op = pWInfo->eOnePass ? OP_Noop : OP_VNext; pLevel->p2 = sqlite3VdbeCurrentAddr(v); sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2); sqlite3ExprCachePop(pParse); |