1
0
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:
drh
2013-06-22 15:44:26 +00:00
parent bc71b1d453
commit 1031bd9958
4 changed files with 13 additions and 9 deletions

View File

@@ -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 ){