mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Fix the query flattener to deal with a RIGHT JOIN corner case described
by [forum:/forumpost/323f86cc30|forum post 323f86cc30]. FossilOrigin-Name: 3f45007d544e5f787d5837b4d9f484ba473d69cdba83c229228e9c2f6b972b75
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user