From ed0a614c213dcad22d23d9c9c9872933c2e8b68c Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 31 Jan 2024 20:11:54 +0000 Subject: Replace an conditional assignment that was made obsolete by [d4c193f0b49f4950] with an assert(). The conditional was added by [d6fd512f50513ab7] as a fix for tickets [c36cdb4afd504dc1], [4051a7f931d9ba24], and [d6fd512f50513ab7] which means now [d4c193f0b49f4950] is the correct fix for those tickets. that check-in FossilOrigin-Name: 44b5524d522e749ad6bf76c94d754ff16c309c32439ec46802924663f64e8b09 --- src/where.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/where.c b/src/where.c index b0fe12e52..65022a65b 100644 --- a/src/where.c +++ b/src/where.c @@ -5464,10 +5464,9 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){ pWInfo->eDistinct = WHERE_DISTINCT_ORDERED; } - if( pWInfo->pSelect->pOrderBy - && pWInfo->nOBSat > pWInfo->pSelect->pOrderBy->nExpr ){ - pWInfo->nOBSat = pWInfo->pSelect->pOrderBy->nExpr; - } + /* vvv--- See check-in [12ad822d9b827777] on 2023-03-16 ---vvv */ + assert( pWInfo->pSelect->pOrderBy==0 + || pWInfo->nOBSat <= pWInfo->pSelect->pOrderBy->nExpr ); }else{ pWInfo->revMask = pFrom->revLoop; if( pWInfo->nOBSat<=0 ){ -- cgit v1.2.3