1
0
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:
dan
2016-12-01 19:38:05 +00:00
parent c9c81dc6d7
commit 92ddb3bd02
4 changed files with 45 additions and 11 deletions

View File

@@ -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;
}