aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
authordrh <>2021-01-13 19:28:17 +0000
committerdrh <>2021-01-13 19:28:17 +0000
commitaf7b76534b3680d712fadf5d5a038c75d4b99a90 (patch)
tree7f60496318a6492d053db74df21347266e962fdb /src/select.c
parentd193057ad147fe038d0f85c68cd914fa9d91c40c (diff)
downloadsqlite-af7b76534b3680d712fadf5d5a038c75d4b99a90.tar.gz
sqlite-af7b76534b3680d712fadf5d5a038c75d4b99a90.zip
Expand the number of optimization-disable bits from 16 to 32. Use one of
the new bits to disable the min/max optimization, so that we can more easily verify that we get the same answer both with and within that optimization. FossilOrigin-Name: fd0c9a123b58b7b134ed67f26dbb4196b61e56227f078422cc7e9a3497054c2d
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c
index 76806b66e..7c3019890 100644
--- a/src/select.c
+++ b/src/select.c
@@ -4640,7 +4640,11 @@ static u8 minMaxQuery(sqlite3 *db, Expr *pFunc, ExprList **ppMinMax){
assert( *ppMinMax==0 );
assert( pFunc->op==TK_AGG_FUNCTION );
assert( !IsWindowFunc(pFunc) );
- if( pEList==0 || pEList->nExpr!=1 || ExprHasProperty(pFunc, EP_WinFunc) ){
+ if( pEList==0
+ || pEList->nExpr!=1
+ || ExprHasProperty(pFunc, EP_WinFunc)
+ || OptimizationDisabled(db, SQLITE_MinMaxOpt)
+ ){
return eRet;
}
zFunc = pFunc->u.zToken;