mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Restore the LEFT JOIN strength reduction that was partially lost in
[d747afda5683ca5f] when strength reduction was generalized to all OUTER JOINs. FossilOrigin-Name: 2d962b84dd8ac2d0968f0283f8f082c1c2a7a1f99b59053b2ad8f58745396447
This commit is contained in:
@@ -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 ){
|
||||
|
||||
Reference in New Issue
Block a user