aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <>2022-08-03 17:26:32 +0000
committerdrh <>2022-08-03 17:26:32 +0000
commit3a17e2e5cf6896486ecdda92ef6abc7a9e74ec6c (patch)
tree894a13c92c83ea1fc5cda39a8ee0ac7d98d58c53 /src/wherecode.c
parentb5a6f33e50224acba83da2cd446ae331736841a1 (diff)
downloadsqlite-3a17e2e5cf6896486ecdda92ef6abc7a9e74ec6c.tar.gz
sqlite-3a17e2e5cf6896486ecdda92ef6abc7a9e74ec6c.zip
Improvement on the previous check-in.
FossilOrigin-Name: c1ab0ea2959259cbd29f624bfd5e7366035f2dbcaab72c0bf55723c0919b7a79
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index ab947773b..85df64279 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -622,8 +622,8 @@ static int codeEqualityTerm(
}
sqlite3ExprDelete(db, pX);
}else{
- aiMap = (int*)sqlite3DbMallocZero(pParse->db,
- sizeof(int)*sqlite3ExprVectorSize(pX->pLeft));
+ int n = sqlite3ExprVectorSize(pX->pLeft);
+ aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*MAX(nEq,n));
eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap, &iTab);
}
pX = pExpr;