When a table-valued function appears as the right table of a RIGHT JOIN,
the argument constraints on the table-valued function should be considered part of the ON clause of the RIGHT JOIN. Fix for the problem reported by [forum:/forumpost/422e635f3beafbf6|forum post 422e635f3beafbf6]. Test cases in TH3. Possibly related to the enhancement at [501609eddf2a46d5]. FossilOrigin-Name: 46639f682975dac6efec4e230aca2c9b127b4fc77e0b465fad38ef4caa9b7a4c
This commit is contained in:
+1
-1
@@ -1856,7 +1856,7 @@ 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) ){
|
||||
if( pItem->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT) ){
|
||||
joinType = EP_OuterON;
|
||||
}else{
|
||||
joinType = EP_InnerON;
|
||||
|
||||
Reference in New Issue
Block a user