1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Remove an ALWAYS() that can sometimes be false. Add a test case that makes

the test false.

FossilOrigin-Name: c8fb143d64d8e823684cd26799080da4b42bef121ca3c6315b1803a593490926
This commit is contained in:
drh
2023-04-11 15:06:20 +00:00
parent e4d8e7e5df
commit 82aacda7eb
4 changed files with 23 additions and 9 deletions

View File

@@ -6288,7 +6288,7 @@ static int agginfoPersistExprCb(Walker *pWalker, Expr *pExpr){
sqlite3 *db = pParse->db;
assert( iAgg>=0 );
if( pExpr->op!=TK_AGG_FUNCTION ){
if( ALWAYS(iAgg<pAggInfo->nColumn)
if( iAgg<pAggInfo->nColumn
&& pAggInfo->aCol[iAgg].pCExpr==pExpr
){
pExpr = sqlite3ExprDup(db, pExpr, 0);