diff options
author | drh <> | 2022-12-21 12:18:06 +0000 |
---|---|---|
committer | drh <> | 2022-12-21 12:18:06 +0000 |
commit | 4f0c36b327cfd244adb8d126008ebc6ac32dff1f (patch) | |
tree | 648560f7bb0022512a060d051a2210653b9ccb30 /src | |
parent | 87bdc152a1a0be0c294eb3f2b048cc4faebb2d71 (diff) | |
download | sqlite-4f0c36b327cfd244adb8d126008ebc6ac32dff1f.tar.gz sqlite-4f0c36b327cfd244adb8d126008ebc6ac32dff1f.zip |
New WHERETRACE entries for adding and removing objects from the
Parse.pIdxEpr list as part of indexed expression coverage. Debug and
testing changes only - no affect on production builds.
FossilOrigin-Name: 4dc438a951bdbe27fbd5ee7cfb907e30ec0efbf8ce02109f18997cc221e0ad3b
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/where.c b/src/where.c index d3e04808f..890c3bf52 100644 --- a/src/where.c +++ b/src/where.c @@ -5678,6 +5678,12 @@ static SQLITE_NOINLINE void whereAddIndexedExpr( p = sqlite3DbMallocRaw(pParse->db, sizeof(IndexedExpr)); if( p==0 ) break; p->pIENext = pParse->pIdxEpr; +#ifdef WHERETRACE_ENABLED + if( sqlite3WhereTrace & 0x200 ){ + sqlite3DebugPrintf("New pParse->pIdxEpr term {%d,%d}\n", iIdxCur, i); + if( sqlite3WhereTrace & 0x5000 ) sqlite3ShowExpr(pExpr); + } +#endif p->pExpr = sqlite3ExprDup(pParse->db, pExpr, 0); p->iDataCur = pTabItem->iCursor; p->iIdxCur = iIdxCur; @@ -6640,6 +6646,13 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){ IndexedExpr *p = pParse->pIdxEpr; while( p ){ if( p->iIdxCur==pLevel->iIdxCur ){ +#ifdef WHERETRACE_ENABLED + if( sqlite3WhereTrace & 0x200 ){ + sqlite3DebugPrintf("Disable pParse->pIdxEpr term {%d,%d}\n", + p->iIdxCur, p->iIdxCol); + if( sqlite3WhereTrace & 0x5000 ) sqlite3ShowExpr(p->pExpr); + } +#endif p->iDataCur = -1; p->iIdxCur = -1; } |