1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-21 09:00:59 +03:00

Fixes for builds without SQLITE_ENABLE_STAT4.

FossilOrigin-Name: 84999e27cc0d14b89d9fe024e29d287c69285369
This commit is contained in:
dan
2013-08-06 20:15:06 +00:00
parent 7a4192358a
commit ddc2d6e8f5
5 changed files with 20 additions and 10 deletions

View File

@@ -761,9 +761,11 @@ static void analyzeOneTable(
}
/* Invoke stat4_push() */
#ifdef SQLITE_ENABLE_STAT4
sqlite3VdbeAddOp3(v, OP_Function, 1, regStat4, regTemp);
sqlite3VdbeChangeP4(v, -1, (char*)&stat4PushFuncdef, P4_FUNCDEF);
sqlite3VdbeChangeP5(v, 2 + 3*nCol);
#endif
sqlite3VdbeAddOp2(v, OP_If, regEof, endOfScan);
for(i=0; i<nCol-1; i++){

View File

@@ -2565,7 +2565,6 @@ static int whereRangeScanEst(
#else
UNUSED_PARAMETER(pParse);
UNUSED_PARAMETER(pBuilder);
UNUSED_PARAMETER(nEq);
#endif
assert( pLower || pUpper );
*pRangeDiv = 0;
@@ -4576,15 +4575,19 @@ static int whereLoopAddBtree(
}
}
#ifdef SQLITE_ENABLE_STAT4
assert( pBuilder->pRec==0 );
rc = sqlite3Stat4ProbeNew(pWInfo->pParse, pProbe, &pBuilder->pRec);
if( rc==SQLITE_OK ){
#endif
rc = whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, 0);
#ifdef SQLITE_ENABLE_STAT4
sqlite3Stat4ProbeFree(pBuilder->pRec);
pBuilder->nRecValid = 0;
pBuilder->pRec = 0;
}
assert( pBuilder->pRec==0 );
#endif
/* If there was an INDEXED BY clause, then only that one index is
** considered. */