diff options
author | drh <> | 2023-06-02 18:05:54 +0000 |
---|---|---|
committer | drh <> | 2023-06-02 18:05:54 +0000 |
commit | 038158e94aa5b5f8ba5253307d67d369b46bf367 (patch) | |
tree | 15fc0851227399fd0b7d4d42ec22d1a07651d2e2 /src/select.c | |
parent | a3f943942c74a5a4030036b0400af87d8af5dc19 (diff) | |
download | sqlite-038158e94aa5b5f8ba5253307d67d369b46bf367.tar.gz sqlite-038158e94aa5b5f8ba5253307d67d369b46bf367.zip |
Restore the LEFT JOIN strength reduction that was partially lost in
[d747afda5683ca5f] when strength reduction was generalized to all OUTER JOINs.
FossilOrigin-Name: 2d962b84dd8ac2d0968f0283f8f082c1c2a7a1f99b59053b2ad8f58745396447
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c index 0058955d1..4e7870365 100644 --- a/src/select.c +++ b/src/select.c @@ -7234,7 +7234,8 @@ int sqlite3Select( ** "OUTER JOIN strength reduction" in the SQLite documentation. */ if( (pItem->fg.jointype & (JT_LEFT|JT_LTORJ))!=0 - && sqlite3ExprImpliesNonNullRow(p->pWhere, pItem->iCursor) + && sqlite3ExprImpliesNonNullRow(p->pWhere, pItem->iCursor, + pItem->fg.jointype & JT_LTORJ) && OptimizationEnabled(db, SQLITE_SimplifyJoin) ){ if( pItem->fg.jointype & JT_LEFT ){ |