1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

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
This commit is contained in:
drh
2019-09-27 15:01:02 +00:00
parent 7971b7fe92
commit 818a3b5486
4 changed files with 11 additions and 9 deletions

View File

@@ -4957,6 +4957,7 @@ int sqlite3ExprCompare(Parse *pParse, Expr *pA, Expr *pB, int iTab){
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;
}
}