aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <>2021-05-22 11:23:20 +0000
committerdrh <>2021-05-22 11:23:20 +0000
commit5e1a7ded4d423e26e7925a514cbe03303524b9a2 (patch)
tree43e1889d6befb24e9e32e32a868ca66c0f576788 /src/wherecode.c
parentff9186137d4fa0c09519ec99f9e503b215c307b7 (diff)
downloadsqlite-5e1a7ded4d423e26e7925a514cbe03303524b9a2.tar.gz
sqlite-5e1a7ded4d423e26e7925a514cbe03303524b9a2.zip
Do not invoke sqlite3ExprAffinity() after a syntax error that might have
left the tree in an inconsistent state. See also [e8a1515b44380cc5] and [forum:/forumpost/7e484e225c|forum post 7e484e225c]. FossilOrigin-Name: b986600520696b0c91c4ccc6aff1b698391b4bcaf8a3ea436be1967883faa2fe
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 4d0ba880d..892772b1c 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -773,7 +773,7 @@ static int codeAllEqualityTerms(
sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
VdbeCoverage(v);
}
- if( pParse->db->mallocFailed==0 ){
+ if( pParse->db->mallocFailed==0 && pParse->nErr==0 ){
if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_BLOB ){
zAff[j] = SQLITE_AFF_BLOB;
}