Simplification, performance improvement, and size reduction in the

codeAllEqualityTerms() function of the code generator.

FossilOrigin-Name: 4fbe02651e877e442d62308d7f607e503695104cd71c5565132fcd1398c120df
This commit is contained in:
drh
2023-05-17 16:13:48 +00:00
parent 60fd5c34ab
commit 653882ed8c
3 changed files with 8 additions and 11 deletions
+1 -4
View File
@@ -812,7 +812,7 @@ static int codeAllEqualityTerms(
/* Figure out how many memory cells we will need then allocate them.
*/
regBase = pParse->nMem + 1;
nReg = pLoop->u.btree.nEq + nExtraReg;
nReg = nEq + nExtraReg;
pParse->nMem += nReg;
zAff = sqlite3DbStrDup(pParse->db,sqlite3IndexAffinityStr(pParse->db,pIdx));
@@ -859,9 +859,6 @@ static int codeAllEqualityTerms(
sqlite3VdbeAddOp2(v, OP_Copy, r1, regBase+j);
}
}
}
for(j=nSkip; j<nEq; j++){
pTerm = pLoop->aLTerm[j];
if( pTerm->eOperator & WO_IN ){
if( pTerm->pExpr->flags & EP_xIsSelect ){
/* No affinity ever needs to be (or should be) applied to a value