1
0
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:
dan
2018-06-14 14:30:51 +00:00
24 changed files with 349 additions and 148 deletions

View File

@@ -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;
}
}