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

Further to [46639f682975dac6], the parameters of a table valued function that

is on the left side of a RIGHT JOIN do not need to be in the ON clause.  Add
new test cases and tags to associated test cases with the code.

FossilOrigin-Name: 18ee689de3d1ae43b05ca52e0b62c49442ebf68a88814a7c679e8856250a4b0d
This commit is contained in:
drh
2023-02-27 14:48:54 +00:00
parent ef22012b6e
commit baef8442d3
6 changed files with 74 additions and 21 deletions

View File

@@ -1856,9 +1856,12 @@ void sqlite3WhereTabFuncArgs(
pRhs = sqlite3PExpr(pParse, TK_UPLUS,
sqlite3ExprDup(pParse->db, pArgs->a[j].pExpr, 0), 0);
pTerm = sqlite3PExpr(pParse, TK_EQ, pColRef, pRhs);
if( pItem->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT) ){
if( pItem->fg.jointype & (JT_LEFT|JT_RIGHT) ){
testcase( pItem->fg.jointype & JT_LEFT ); /* testtag-20230227a */
testcase( pItem->fg.jointype & JT_RIGHT ); /* testtag-20230227b */
joinType = EP_OuterON;
}else{
testcase( pItem->fg.jointype & JT_LTORJ ); /* testtag-20230227c */
joinType = EP_InnerON;
}
sqlite3SetJoinExpr(pTerm, pItem->iCursor, joinType);