aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <>2022-04-08 19:20:12 +0000
committerdrh <>2022-04-08 19:20:12 +0000
commita76ac88af86bb5a3753b7fec6c86bfcfaf64f439 (patch)
treeee7470bbee2c439f2579fe0df96ba784cbc6c01a /src/wherecode.c
parent7d0ae00361386f87d179916d5abc6c11d3c85330 (diff)
downloadsqlite-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/wherecode.c')
-rw-r--r--src/wherecode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index bab514a69..d349a9402 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -2604,7 +2604,9 @@ Bitmask sqlite3WhereCodeOneLoopStart(
}
pE = pTerm->pExpr;
assert( pE!=0 );
- if( (pTabItem->fg.jointype&JT_LEFT) && !ExprHasProperty(pE,EP_FromJoin) ){
+ if( (pTabItem->fg.jointype & (JT_LEFT|JT_LTORJ))
+ && !ExprHasProperty(pE,EP_FromJoin)
+ ){
continue;
}
@@ -2666,7 +2668,7 @@ Bitmask sqlite3WhereCodeOneLoopStart(
if( (pTerm->eOperator & (WO_EQ|WO_IS))==0 ) continue;
if( (pTerm->eOperator & WO_EQUIV)==0 ) continue;
if( pTerm->leftCursor!=iCur ) continue;
- if( pTabItem->fg.jointype & JT_LEFT ) continue;
+ if( pTabItem->fg.jointype & (JT_LEFT|JT_LTORJ) ) continue;
pE = pTerm->pExpr;
#ifdef WHERETRACE_ENABLED /* 0x800 */
if( sqlite3WhereTrace & 0x800 ){