1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Aggregates with GROUP BY can sometimes return no result rows. (CVS 2674)

FossilOrigin-Name: 0c3e368d4766685b94a44f2c514e2dea806c297c
This commit is contained in:
drh
2005-09-08 12:57:28 +00:00
parent eb796a7c8f
commit 97571957a1
4 changed files with 25 additions and 11 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.265 2005/09/08 01:58:43 drh Exp $
** $Id: select.c,v 1.266 2005/09/08 12:57:28 drh Exp $
*/
#include "sqliteInt.h"
@@ -2920,7 +2920,7 @@ int sqlite3Select(
sqlite3VdbeAddOp(v, OP_MakeRecord, j, 0);
sqlite3VdbeAddOp(v, OP_IdxInsert, sAggInfo.sortingIdx, 0);
sqlite3WhereEnd(pWInfo);
sqlite3VdbeAddOp(v, OP_Sort, sAggInfo.sortingIdx, 0);
sqlite3VdbeAddOp(v, OP_Sort, sAggInfo.sortingIdx, addrEnd);
sAggInfo.useSortingIdx = 1;
}