mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Avoid clearing the EP_FromJoin flag from terms in ON clauses when flattening
sub-selects. Possible fix for [2df0107b]. FossilOrigin-Name: 8bed4cd549759a93c4a087d8d8c08c0068ba8d59
This commit is contained in:
@@ -3164,6 +3164,10 @@ static Expr *substExpr(
|
||||
assert( pEList!=0 && pExpr->iColumn<pEList->nExpr );
|
||||
assert( pExpr->pLeft==0 && pExpr->pRight==0 );
|
||||
pNew = sqlite3ExprDup(db, pEList->a[pExpr->iColumn].pExpr, 0);
|
||||
if( pNew && (pExpr->flags & EP_FromJoin) ){
|
||||
pNew->iRightJoinTable = pExpr->iRightJoinTable;
|
||||
pNew->flags |= EP_FromJoin;
|
||||
}
|
||||
sqlite3ExprDelete(db, pExpr);
|
||||
pExpr = pNew;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user