diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sqliteInt.h | 1 | ||||
-rw-r--r-- | src/where.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index d5cb69732..a98eb4b3d 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -978,6 +978,7 @@ struct sqlite3 { #define SQLITE_CoverIdxScan 0x0040 /* Covering index scans */ #define SQLITE_OrderByIdxJoin 0x0080 /* ORDER BY of joins via index */ #define SQLITE_SubqCoroutine 0x0100 /* Evaluate subqueries as coroutines */ +#define SQLITE_Transitive 0x0200 /* Transitive constraints */ #define SQLITE_AllOpts 0xffff /* All optimizations */ /* diff --git a/src/where.c b/src/where.c index 46268bf0f..f97bf019c 100644 --- a/src/where.c +++ b/src/where.c @@ -1295,7 +1295,10 @@ static void exprAnalyze( pTerm = &pWC->a[idxTerm]; pTerm->nChild = 1; pTerm->wtFlags |= TERM_COPIED; - if( pExpr->op==TK_EQ && !ExprHasProperty(pExpr, EP_FromJoin) ){ + if( pExpr->op==TK_EQ + && !ExprHasProperty(pExpr, EP_FromJoin) + && OptimizationEnabled(db, SQLITE_Transitive) + ){ pTerm->eOperator |= WO_EQUIV; eExtraOp = WO_EQUIV; } |