mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Add the ability to disable the omit-join-table optimization for testing
purposes. FossilOrigin-Name: d929df9b1ba214c27d8c437099a53ee9b07aa169
This commit is contained in:
@@ -5789,7 +5789,10 @@ WhereInfo *sqlite3WhereBegin(
|
||||
}
|
||||
#endif
|
||||
/* Attempt to omit tables from the join that do not effect the result */
|
||||
if( pResultSet!=0 && pWInfo->nLevel>=2 ){
|
||||
if( pWInfo->nLevel>=2
|
||||
&& pResultSet!=0
|
||||
&& OptimizationEnabled(db, SQLITE_OmitNoopJoin)
|
||||
){
|
||||
Bitmask tabUsed = exprListTableUsage(pMaskSet, pResultSet);
|
||||
if( pOrderBy ) tabUsed |= exprListTableUsage(pMaskSet, pOrderBy);
|
||||
while( pWInfo->nLevel>=2 ){
|
||||
|
||||
Reference in New Issue
Block a user