aboutsummaryrefslogtreecommitdiff
path: root/src/where.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-06-22 15:44:26 +0000
committerdrh <drh@noemail.net>2013-06-22 15:44:26 +0000
commit1031bd99581c1c3d7da99eb1c9a74a4cf053e0da (patch)
tree104c9e5188609ab615cd9d8b5347e4bf88164e45 /src/where.c
parentbc71b1d4536ce7842f80010049c69f5fd2806b3b (diff)
downloadsqlite-1031bd99581c1c3d7da99eb1c9a74a4cf053e0da.tar.gz
sqlite-1031bd99581c1c3d7da99eb1c9a74a4cf053e0da.zip
Add the ability to disable the omit-join-table optimization for testing
purposes. FossilOrigin-Name: d929df9b1ba214c27d8c437099a53ee9b07aa169
Diffstat (limited to 'src/where.c')
-rw-r--r--src/where.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c
index 32fa61c7f..e20f2b301 100644
--- a/src/where.c
+++ b/src/where.c
@@ -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 ){