1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

RIGHT JOIN USING now appears to work the same as PG-14. Legacy tests pass.

FossilOrigin-Name: 5bfb862419541de955dae35fc91f6e9fc70e2744bb786d49fa26bede80b9091d
This commit is contained in:
drh
2022-04-16 12:40:52 +00:00
parent be60896485
commit bdbda1eb1f
5 changed files with 104 additions and 17 deletions

View File

@@ -5829,7 +5829,8 @@ static int selectExpander(Walker *pWalker, Select *p){
zToFree = 0;
}
if( pTabList->nSrc>1
&& !inAnyUsingClause(zName,pFrom,pTabList->nSrc-i-1)
&& ( (pFrom->fg.jointype & JT_LTORJ)==0
|| !inAnyUsingClause(zName,pFrom,pTabList->nSrc-i-1) )
){
Expr *pLeft;
pLeft = sqlite3Expr(db, TK_ID, zTabName);