diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c index 122313e70..86629d5c3 100644 --- a/src/select.c +++ b/src/select.c @@ -3763,9 +3763,10 @@ static Expr *substExpr( Expr *pExpr /* Expr in which substitution occurs */ ){ if( pExpr==0 ) return 0; - if( ExprHasProperty(pExpr, EP_OuterON) + if( ExprHasProperty(pExpr, EP_OuterON|EP_InnerON) && pExpr->w.iJoin==pSubst->iTable ){ + testcase( ExprHasProperty(pExpr, EP_InnerON) ); pExpr->w.iJoin = pSubst->iNewTable; } if( pExpr->op==TK_COLUMN |