diff options
author | stephan <stephan@noemail.net> | 2023-01-21 12:18:28 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2023-01-21 12:18:28 +0000 |
commit | cdcb84ef00da4a9b367e6536149634f633c41c71 (patch) | |
tree | 45826b1e478212df2dab3e0dacc8305a4f364c0a /src/json.c | |
parent | a7c498599f917607542bcd7003c445723aba9127 (diff) | |
parent | 3fdb05e883ce0a6fc610474eaa37d79fd7ac67e1 (diff) | |
download | sqlite-cdcb84ef00da4a9b367e6536149634f633c41c71.tar.gz sqlite-cdcb84ef00da4a9b367e6536149634f633c41c71.zip |
Merge trunk into wasi-patches branch.
FossilOrigin-Name: 6fc20d75d49310aedbc3351a4a5f1aa9ef5b4100501c7bfbe556aca2be2e44d7
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/json.c b/src/json.c index 3636d3665..67448421b 100644 --- a/src/json.c +++ b/src/json.c @@ -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 */ @@ -2668,10 +2675,10 @@ void sqlite3RegisterJsonFunctions(void){ #endif WAGGREGATE(json_group_array, 1, 0, 0, jsonArrayStep, jsonArrayFinal, jsonArrayValue, jsonGroupInverse, - SQLITE_SUBTYPE|SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS), + SQLITE_SUBTYPE|SQLITE_UTF8|SQLITE_DETERMINISTIC), WAGGREGATE(json_group_object, 2, 0, 0, jsonObjectStep, jsonObjectFinal, jsonObjectValue, jsonGroupInverse, - SQLITE_SUBTYPE|SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS) + SQLITE_SUBTYPE|SQLITE_UTF8|SQLITE_DETERMINISTIC) }; sqlite3InsertBuiltinFuncs(aJsonFunc, ArraySize(aJsonFunc)); #endif |