mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Completely remove the column cache logic, which has been a persistent source
of bugs for many years. We recent enhancements to the performance of the OP_Column opcode, the removing the column cache actually makes speed-check.sh run faster. It also saves about 1,800 bytes of code space. FossilOrigin-Name: 3f5f60cd7529330209027fdae8129cca420cec1050eae50a7750d0b715b56972
This commit is contained in:
@@ -347,7 +347,6 @@ static void codeApplyAffinity(Parse *pParse, int base, int n, char *zAff){
|
||||
/* Code the OP_Affinity opcode if there is anything left to do. */
|
||||
if( n>0 ){
|
||||
sqlite3VdbeAddOp4(v, OP_Affinity, base, n, 0, zAff, n);
|
||||
sqlite3ExprCacheAffinityChange(pParse, base, n);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1256,7 +1255,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
int nConstraint = pLoop->nLTerm;
|
||||
int iIn; /* Counter for IN constraints */
|
||||
|
||||
sqlite3ExprCachePush(pParse);
|
||||
iReg = sqlite3GetTempRange(pParse, nConstraint+2);
|
||||
addrNotFound = pLevel->addrBrk;
|
||||
for(j=0; j<nConstraint; j++){
|
||||
@@ -1329,7 +1327,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
**
|
||||
** sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2);
|
||||
*/
|
||||
sqlite3ExprCachePop(pParse);
|
||||
}else
|
||||
#endif /* SQLITE_OMIT_VIRTUALTABLE */
|
||||
|
||||
@@ -1422,7 +1419,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
VdbeCoverageIf(v, pX->op==TK_LE);
|
||||
VdbeCoverageIf(v, pX->op==TK_LT);
|
||||
VdbeCoverageIf(v, pX->op==TK_GE);
|
||||
sqlite3ExprCacheAffinityChange(pParse, r1, 1);
|
||||
sqlite3ReleaseTempReg(pParse, rTemp);
|
||||
}else{
|
||||
sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iCur, addrHalt);
|
||||
@@ -1457,7 +1453,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
if( testOp!=OP_Noop ){
|
||||
iRowidReg = ++pParse->nMem;
|
||||
sqlite3VdbeAddOp2(v, OP_Rowid, iCur, iRowidReg);
|
||||
sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
|
||||
sqlite3VdbeAddOp3(v, testOp, memEndValue, addrBrk, iRowidReg);
|
||||
VdbeCoverageIf(v, testOp==OP_Le);
|
||||
VdbeCoverageIf(v, testOp==OP_Lt);
|
||||
@@ -1683,7 +1678,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
nConstraint = nEq;
|
||||
if( pRangeEnd ){
|
||||
Expr *pRight = pRangeEnd->pExpr->pRight;
|
||||
sqlite3ExprCacheRemove(pParse, regBase+nEq, 1);
|
||||
codeExprOrVector(pParse, pRight, regBase+nEq, nTop);
|
||||
whereLikeOptimizationStringFixup(v, pLevel, pRangeEnd);
|
||||
if( (pRangeEnd->wtFlags & TERM_VNULL)==0
|
||||
@@ -1708,7 +1702,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
}
|
||||
}else if( bStopAtNull ){
|
||||
sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
|
||||
sqlite3ExprCacheRemove(pParse, regBase+nEq, 1);
|
||||
endEq = 0;
|
||||
nConstraint++;
|
||||
}
|
||||
@@ -1742,7 +1735,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
)){
|
||||
iRowidReg = ++pParse->nMem;
|
||||
sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur, iRowidReg);
|
||||
sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
|
||||
sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, iRowidReg);
|
||||
VdbeCoverage(v);
|
||||
}else{
|
||||
@@ -2226,7 +2218,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
pLevel->addrFirst = sqlite3VdbeCurrentAddr(v);
|
||||
sqlite3VdbeAddOp2(v, OP_Integer, 1, pLevel->iLeftJoin);
|
||||
VdbeComment((v, "record LEFT JOIN hit"));
|
||||
sqlite3ExprCacheClear(pParse);
|
||||
for(pTerm=pWC->a, j=0; j<pWC->nTerm; j++, pTerm++){
|
||||
testcase( pTerm->wtFlags & TERM_VIRTUAL );
|
||||
testcase( pTerm->wtFlags & TERM_CODED );
|
||||
|
||||
Reference in New Issue
Block a user