Ensure that ON clauses are applied to the correct outer join.

FossilOrigin-Name: c7e3a13a3288c577209be99c630fbe924e19880e8af1aa8a83b517acaa8b43d7
This commit is contained in:
drh
2022-05-12 11:56:44 +00:00
parent 902e2602c2
commit d631c6af80
4 changed files with 33 additions and 9 deletions
+2 -1
View File
@@ -2621,7 +2621,8 @@ Bitmask sqlite3WhereCodeOneLoopStart(
pE = pTerm->pExpr;
assert( pE!=0 );
if( (pTabItem->fg.jointype & (JT_LEFT|JT_LTORJ))
&& !ExprHasProperty(pE,EP_FromJoin|EP_InnerJoin)
&& (!ExprHasProperty(pE,EP_FromJoin|EP_InnerJoin)
|| pE->w.iJoin!=pTabItem->iCursor)
){
continue;
}