diff options
author | dan <dan@noemail.net> | 2018-06-14 14:30:51 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2018-06-14 14:30:51 +0000 |
commit | 09882a75c4f8641e4e06a9ba6402fea02b56a4d6 (patch) | |
tree | dc635d7e7770abb133f48227fac362500f20e78e /src/expr.c | |
parent | 54a9ab3f131cf1b309b60d74ecfa2a0cc960321a (diff) | |
parent | 2f1f8801ed7d3708de6fc4d669bc1aef43b3f524 (diff) | |
download | sqlite-09882a75c4f8641e4e06a9ba6402fea02b56a4d6.tar.gz sqlite-09882a75c4f8641e4e06a9ba6402fea02b56a4d6.zip |
Merge latest trunk changes into this branch.
FossilOrigin-Name: 5cf5f1808a51f9c2cfc98dd49b4f1ce860b53e935287f89868ce2fdbace8eb06
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c index 9431c4c20..a5a0b7403 100644 --- a/src/expr.c +++ b/src/expr.c @@ -3212,6 +3212,13 @@ void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int iReg){ } #endif +#ifdef SQLITE_DEBUG_COLUMNCACHE + /* Add a SetTabCol opcode for run-time verification that the column + ** cache is working correctly. + */ + sqlite3VdbeAddOp3(pParse->pVdbe, OP_SetTabCol, iTab, iCol, iReg); +#endif + /* If the cache is already full, delete the least recently used entry */ if( pParse->nColCache>=SQLITE_N_COLCACHE ){ minLru = 0x7fffffff; @@ -3385,6 +3392,9 @@ int sqlite3ExprCodeGetColumn( if( p->iTable==iTable && p->iColumn==iColumn ){ p->lru = pParse->iCacheCnt++; sqlite3ExprCachePinRegister(pParse, p->iReg); +#ifdef SQLITE_DEBUG_COLUMNCACHE + sqlite3VdbeAddOp3(v, OP_VerifyTabCol, iTable, iColumn, p->iReg); +#endif return p->iReg; } } |