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

Honor the orderByConsumed boolean returned from virtual table query planner.

FossilOrigin-Name: aaf7f5896d3523531e1a9a1b90c4ad326f0c8fc7
This commit is contained in:
drh
2013-06-03 16:56:37 +00:00
parent 5298630631
commit 3b1d808fab
3 changed files with 9 additions and 8 deletions

View File

@@ -4350,7 +4350,8 @@ static int whereLoopAddVirtual(
pNew->u.vtab.needFree = pIdxInfo->needToFreeIdxStr;
pIdxInfo->needToFreeIdxStr = 0;
pNew->u.vtab.idxStr = pIdxInfo->idxStr;
pNew->u.vtab.isOrdered = (u8)(pIdxInfo->nOrderBy!=0);
pNew->u.vtab.isOrdered = (u8)((pIdxInfo->nOrderBy!=0)
&& pIdxInfo->orderByConsumed);
pNew->rSetup = (double)0;
pNew->rRun = pIdxInfo->estimatedCost;
pNew->nOut = (double)25;