mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-11 12:22:51 +03:00
Fix a long-standing issue with the distinct-as-aggregate optimization that
only expressed when the new collating-sequence logic is turned on. FossilOrigin-Name: 0aaf52a339808386984c30cca0c0c35ac2e70e7e
This commit is contained in:
@@ -111,20 +111,9 @@ static void resolveAlias(
|
||||
}
|
||||
pDup->iTable = pEList->a[iCol].iAlias;
|
||||
}
|
||||
#if 1 /* FIXME */
|
||||
if( pExpr->flags & EP_Collate ){
|
||||
CollSeq *pColl = sqlite3ExprCollSeq(pParse, pExpr);
|
||||
if( pColl ){
|
||||
pDup = sqlite3ExprAddCollateString(pParse, pDup, pColl->zName);
|
||||
}
|
||||
pDup->flags |= EP_Collate;
|
||||
}
|
||||
#else
|
||||
/* Should be this: */
|
||||
if( pExpr->op==TK_COLLATE ){
|
||||
pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
|
||||
** prevents ExprDelete() from deleting the Expr structure itself,
|
||||
|
Reference in New Issue
Block a user