mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Merge latest trunk changes into this branch.
FossilOrigin-Name: 5cf5f1808a51f9c2cfc98dd49b4f1ce860b53e935287f89868ce2fdbace8eb06
This commit is contained in:
10
src/expr.c
10
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user