1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Avoid problems when a query has a GROUP BY and an ORDER BY but no FROM clause.

FossilOrigin-Name: e527d96a1e098ade4e9d124b630a8c2ea2ac9b36
This commit is contained in:
drh
2015-04-12 01:22:04 +00:00
parent ead438156e
commit 11b0481778
4 changed files with 13 additions and 10 deletions

View File

@@ -6241,7 +6241,7 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){
pWInfo->revMask = pFrom->revLoop;
}
if( (pWInfo->wctrlFlags & WHERE_SORTBYGROUP)
&& pWInfo->nOBSat==pWInfo->pOrderBy->nExpr
&& pWInfo->nOBSat==pWInfo->pOrderBy->nExpr && nLoop>0
){
Bitmask revMask = 0;
int nOrder = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy,