diff options
author | drh <> | 2022-04-08 19:20:12 +0000 |
---|---|---|
committer | drh <> | 2022-04-08 19:20:12 +0000 |
commit | a76ac88af86bb5a3753b7fec6c86bfcfaf64f439 (patch) | |
tree | ee7470bbee2c439f2579fe0df96ba784cbc6c01a /src/select.c | |
parent | 7d0ae00361386f87d179916d5abc6c11d3c85330 (diff) | |
download | sqlite-a76ac88af86bb5a3753b7fec6c86bfcfaf64f439.tar.gz sqlite-a76ac88af86bb5a3753b7fec6c86bfcfaf64f439.zip |
Preliminary code to support RIGHT JOIN. Everything seems to work, except that
the code to compute the unmatched rows for the RIGHT JOIN has not yet been
added, so the result of a RIGHT JOIN is currently the same as an INNER JOIN.
FossilOrigin-Name: 415abd6731b8e8a605adabfa6066c8a852a8531c300df41325d5f7e75cae5a70
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/select.c b/src/select.c index 7ac23bd38..b9321aece 100644 --- a/src/select.c +++ b/src/select.c @@ -301,10 +301,6 @@ int sqlite3JoinType(Parse *pParse, Token *pA, Token *pB, Token *pC){ sqlite3ErrorMsg(pParse, "unknown or unsupported join type: " "%T%s%T%s%T", pA, zSp1, pB, zSp2, pC); jointype = JT_INNER; - }else if( (jointype & JT_RIGHT)!=0 ){ - sqlite3ErrorMsg(pParse, - "RIGHT and FULL OUTER JOINs are not currently supported"); - jointype = JT_INNER; } return jointype; } @@ -6589,7 +6585,7 @@ int sqlite3Select( && i==0 && (p->selFlags & SF_ComplexResult)!=0 && (pTabList->nSrc==1 - || (pTabList->a[1].fg.jointype&(JT_LEFT|JT_CROSS))!=0) + || (pTabList->a[1].fg.jointype&(JT_OUTER|JT_CROSS))!=0) ){ continue; } @@ -6741,8 +6737,8 @@ int sqlite3Select( */ if( i==0 && (pTabList->nSrc==1 - || (pTabList->a[1].fg.jointype&(JT_LEFT|JT_CROSS))!=0) /* (1) */ - && (pItem->fg.isCte==0 || pItem->u2.pCteUse->eM10d!=M10d_Yes) /* (2) */ + || (pTabList->a[1].fg.jointype&(JT_OUTER|JT_CROSS))!=0) /* (1) */ + && (pItem->fg.isCte==0 || pItem->u2.pCteUse->eM10d!=M10d_Yes) /* (2) */ ){ /* Implement a co-routine that will return a single row of the result ** set on each invocation. |