1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Fix a corner-case for [9441fff52cc4e19c].

FossilOrigin-Name: 336a59eb3afd80ce048de472368df6dfc32934ee783859d37663ed8f5cf169a5
This commit is contained in:
drh
2025-06-17 18:57:07 +00:00
parent 9ebf9d358b
commit 110055cd6c
3 changed files with 13 additions and 9 deletions

View File

@@ -946,7 +946,11 @@ static int termIsEquivalence(Parse *pParse, Expr *pExpr, SrcList *pSrc){
if( !OptimizationEnabled(pParse->db, SQLITE_Transitive) ) return 0; /* (1) */
if( pExpr->op!=TK_EQ && pExpr->op!=TK_IS ) return 0; /* (2) */
if( ExprHasProperty(pExpr, EP_OuterON) ) return 0; /* (3) */
if( pExpr->op==TK_IS && (pSrc->a[0].fg.jointype & JT_LTORJ)!=0 ){
assert( pSrc!=0 );
if( pExpr->op==TK_IS
&& pSrc->nSrc
&& (pSrc->a[0].fg.jointype & JT_LTORJ)!=0
){
return 0; /* (4) */
}
aff1 = sqlite3ExprAffinity(pExpr->pLeft);