mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Update virtual tables json_each and json_tree so that adding "ORDER BY rowid" to a query does not require an external sort.
FossilOrigin-Name: ce18f0ed684824e67ed6c09acab8e735fef2c52b2ed32270dee1a2a67802c59b
This commit is contained in:
@@ -2473,6 +2473,13 @@ static int jsonEachBestIndex(
|
||||
idxMask |= iMask;
|
||||
}
|
||||
}
|
||||
if( pIdxInfo->nOrderBy>0
|
||||
&& pIdxInfo->aOrderBy[0].iColumn<0
|
||||
&& pIdxInfo->aOrderBy[0].desc==0
|
||||
){
|
||||
pIdxInfo->orderByConsumed = 1;
|
||||
}
|
||||
|
||||
if( (unusableMask & ~idxMask)!=0 ){
|
||||
/* If there are any unusable constraints on JSON or ROOT, then reject
|
||||
** this entire plan */
|
||||
|
||||
Reference in New Issue
Block a user