mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Fix for ticket #131: When a SELECT contains a GROUP BY clause it cannot
use an index for sorting. It has to sort as a separate operation after the GROUP BY is complete. (CVS 702) FossilOrigin-Name: 18745c67acdf7ebec378f5538174117970e9f5cc
This commit is contained in:
@@ -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.106 2002/07/18 00:34:12 drh Exp $
|
||||
** $Id: select.c,v 1.107 2002/08/04 00:52:38 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -1945,7 +1945,8 @@ int sqliteSelect(
|
||||
|
||||
/* Begin the database scan
|
||||
*/
|
||||
pWInfo = sqliteWhereBegin(pParse, p->base, pTabList, pWhere, 0, &pOrderBy);
|
||||
pWInfo = sqliteWhereBegin(pParse, p->base, pTabList, pWhere, 0,
|
||||
pGroupBy ? 0 : &pOrderBy);
|
||||
if( pWInfo==0 ) goto select_end;
|
||||
|
||||
/* Use the standard inner loop if we are not dealing with
|
||||
|
||||
Reference in New Issue
Block a user