diff options
author | drh <> | 2023-03-29 14:42:11 +0000 |
---|---|---|
committer | drh <> | 2023-03-29 14:42:11 +0000 |
commit | a9fd5f224c72013062a8b34781396d3832c8f05a (patch) | |
tree | 2956415f8bebf525e02a6b25bce09dc33774200a /src | |
parent | df542e0500fadd22b04cc839264aaa146049265b (diff) | |
download | sqlite-a9fd5f224c72013062a8b34781396d3832c8f05a.tar.gz sqlite-a9fd5f224c72013062a8b34781396d3832c8f05a.zip |
New #ifdefs to omit code that is unused except under STAT4.
FossilOrigin-Name: 09a9b30ba7828a487a33a3ebf8028dfaa147dff67d2724584123b90a88d9814b
Diffstat (limited to 'src')
-rw-r--r-- | src/analyze.c | 4 | ||||
-rw-r--r-- | src/expr.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/analyze.c b/src/analyze.c index b6b59a6b7..6e9d72464 100644 --- a/src/analyze.c +++ b/src/analyze.c @@ -1389,7 +1389,11 @@ static void analyzeDatabase(Parse *pParse, int iDb){ for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){ Table *pTab = (Table*)sqliteHashData(k); analyzeOneTable(pParse, pTab, 0, iStatCur, iMem, iTab); +#ifdef SQLITE_ENABLE_STAT4 iMem = sqlite3FirstAvailableRegister(pParse, iMem); +#else + assert( iMem==sqlite3FirstAvailableRegister(pParse,iMem) ); +#endif } loadAnalysis(pParse, iDb); } diff --git a/src/expr.c b/src/expr.c index 80bfbadc3..c17eb0f7e 100644 --- a/src/expr.c +++ b/src/expr.c @@ -6646,6 +6646,7 @@ void sqlite3TouchRegister(Parse *pParse, int iReg){ if( pParse->nMem<iReg ) pParse->nMem = iReg; } +#if defined(SQLITE_ENABLE_STAT4) || defined(SQLITE_DEBUG) /* ** Return the latest reusable register in the set of all registers. ** The value returned is no less than iMin. If any register iMin or @@ -6666,6 +6667,7 @@ int sqlite3FirstAvailableRegister(Parse *pParse, int iMin){ pParse->nRangeReg = 0; return iMin; } +#endif /* SQLITE_ENABLE_STAT4 || SQLITE_DEBUG */ /* ** Validate that no temporary register falls within the range of |