aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <>2023-05-17 16:13:48 +0000
committerdrh <>2023-05-17 16:13:48 +0000
commit653882ed8ce3fa794ac23dbafaba404ffda04b0d (patch)
tree9a2e2fa84332f2c42ffaac7bbc3dd7d15bb5edd0 /src/wherecode.c
parent60fd5c34abec24a39fdb9e467174944f8d245544 (diff)
downloadsqlite-653882ed8ce3fa794ac23dbafaba404ffda04b0d.tar.gz
sqlite-653882ed8ce3fa794ac23dbafaba404ffda04b0d.zip
Simplification, performance improvement, and size reduction in the
codeAllEqualityTerms() function of the code generator. FossilOrigin-Name: 4fbe02651e877e442d62308d7f607e503695104cd71c5565132fcd1398c120df
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index a998c0a4f..9158c9738 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -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