mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Ensure the SF_Aggregate flag on a SELECT statement is set if a DISTINCT is transformed to a GROUP BY. Ticket [9c944882].
FossilOrigin-Name: 1409758f72c0206cc48f9f7e789382472949523b7056ea46f8dcb93fd3ea60c6
This commit is contained in:
@@ -6104,6 +6104,7 @@ int sqlite3Select(
|
||||
){
|
||||
p->selFlags &= ~SF_Distinct;
|
||||
pGroupBy = p->pGroupBy = sqlite3ExprListDup(db, pEList, 0);
|
||||
p->selFlags |= SF_Aggregate;
|
||||
/* Notice that even thought SF_Distinct has been cleared from p->selFlags,
|
||||
** the sDistinct.isTnct is still set. Hence, isTnct represents the
|
||||
** original setting of the SF_Distinct flag, not the current setting */
|
||||
|
||||
Reference in New Issue
Block a user