Fix sqlite3ExprCompare() so that it ignores differences in the Expr.iTable
field for IN operators, as otherwise it can lead to false negatives, which
is usually harmless, but can cause problems for an assert() in the window
function logic.
FossilOrigin-Name: 6a204b192a6c6f21988cab217366f21b14c672b81ceadc43675761a6d8c4484f
diff --git a/src/expr.c b/src/expr.c
index 43f20d8..22c0d0e 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -4957,6 +4957,7 @@
if( pA->iColumn!=pB->iColumn ) return 2;
if( pA->op2!=pB->op2 ) return 2;
if( pA->iTable!=pB->iTable
+ && pA->op!=TK_IN
&& (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2;
}
}