aboutsummaryrefslogtreecommitdiff
path: root/src/json.c
Commit message (Collapse)AuthorAge
...
| * Add the SQLITE_RESULT_SUBTYPE flag for application-defined functions. Adddrh2023-11-09
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | the -DSQLITE_STRICT_SUBTYPE=1 compile-time option that raises an error if any function invokes sqlite3_result_subtype() without the SQLITE_RESULT_SUBTYPE flag. SQLITE_RESULT_SUBTYPE prevents an indexed value of that function from being used to replace an equivalent expression, since the indexed expression does not carry the subtype. Fix for the problem described at [forum:/forumpost/68d284c86b082c3e|forum post 68d284c86b082c3e]. FossilOrigin-Name: ba789a7804ab96d81b15d6ef6fed1f802fa69db47cf91d368933e55289fa1d6e
| | * Fixes: (1) In the ->> function, instead of setting a subtype and clearing it,drh2023-11-09
| | | | | | | | | | | | | | | | | | | | | do not set it in the first place, as doing the set would trigger an error under SQLITE_STRICT_SUBTYPE. (2) Allow the SQLITE_STRICT_SUBTYPE through the property filter on sqlite3_create_function(). FossilOrigin-Name: 6195468b14f6f17ea072cf191c9ef1bd0713acd314bc6dc128be7322bfd612cc
| | * Omit the new SQLITE_VALUE_SUBTYPE name. Stay with legacy SQLTIE_SUBTYPE.drh2023-11-09
| | | | | | | | | | | | | | | | | | | | | Add extra documentation to sqlite3_value_subtype() and sqlite3_result_subtype() indicating that the SQLITE_SUBTYPE and SQLITE_RESULT_SUBTYPE properties are required on functions that use those interfaces. FossilOrigin-Name: 563ad3be60d22c45f1c5b9a3e67738593f8b38f137147c56514166fbabf95365
| | * Make a distinction between functions that consume subtypes and functionsdrh2023-11-08
| | | | | | | | | | | | | | | that generate subtypes. FossilOrigin-Name: 48a92e3ad855227188a4c5afe4abbb7171761cf6fc930660084d9abeecfd91d9
| * | JSON5 bug fix: Escape double-quotes that occur inside of single-quoted strings.drh2023-11-09
| |/ | | | | | | | | [forum:/forumpost/ddcad3e884|Forum post ddcad3e884]. FossilOrigin-Name: 1c98d46d60ef1494bd8b7561c7d0cd5aafc178201a6f1f0da25dea6140b91cd0
* | Merge recent trunk enhancements into the jsonb branch, and especially thedrh2023-11-08
|\| | | | | | | | | finer-grain characterization of JSON function properties. FossilOrigin-Name: 72393b003f9f8675e4a124dddd09607b5b34ddefe56716b283c68c0982fb3d96
| * More precise characterization of JSON functions. Indicate when functions mightdrh2023-11-08
| | | | | | | | | | return JSON (subtype 'J') and when they make use of the function argument cache. FossilOrigin-Name: b2b62546c4a5e9dccb8aa0cb8eda228d662c69159e320b01a377317bc909e89f
* | Enhance the JSONB lookup routine with logic to apply edits. The new logic isdrh2023-11-03
| | | | | | | | | | currently unused and hence untested but does not create any regressions. FossilOrigin-Name: b12110276fc15d1b6b0cc455f89747ace7a09650d5ba433d8bb431bb4e5bc951
* | Merge recent trunk enhancements into the jsonb branch.drh2023-10-19
|\| | | | | FossilOrigin-Name: f47a8d0a207a8442a7f621b070ce9dd1d6013ce26bcf68165d20bb379bd478a0
| * Fix a harmless compiler warning about variant types for a pointer function.drh2023-10-17
| | | | | | FossilOrigin-Name: 37ff0d8e7f91c32e8c53bb015280be47c66bf599281b640a8d3fd41335b55289
| * Fix a JSON bug introduced by the optimization of [df099ad713011b67] anddrh2023-10-17
| | | | | | | | | | | | | | first appearing in 3.43.0. The problem occurs when doing a JSON_EXTRACT() on an array element that was added by JSON_SET() without first reparsing. Reported by [forum:/forumpost/fc0e3f1e2a|forum post fc0e3f1e2a]. FossilOrigin-Name: e5099c549a1d8959d4015516f090b8e6438e517a64b20651175bf5413d94fb58
| * Fix the use of an uninitialized value that occurs when doing a json_insert()drh2023-10-11
| | | | | | | | | | of a string value that contains embedded U+0000 characters. FossilOrigin-Name: d3c0cbb90966316be9cd25e3edb501da42731e8a83c13227b90ce17d3975a2c3
* | Fix the use of an uninitialized value that occurs when doing a json_insert()drh2023-10-11
| | | | | | | | | | of a string value that contains embedded U+0000 characters. FossilOrigin-Name: fc5ee9e51ad4556af526a6cefca5ae5a3b1b7affc4edf09832491d6b4f4ba366
* | Fix a missing zero-terminator on a string when processingdrh2023-10-11
| | | | | | | | | | JSON aggregates into JSONB. FossilOrigin-Name: fb81d570a3d9b8f55e9f278d5240605c5d0f3c5abde51550797999d03cf193a7
* | Fix an issue that can arise when processing corrupt JSONB.drh2023-10-11
| | | | | | FossilOrigin-Name: e50045c22296be84c6bea82bb8b310f07bca820c84d4a7349b16da0cf5d2657c
* | Improved robustness against corrupt JSONB.drh2023-10-11
| | | | | | FossilOrigin-Name: 0fbda92bb0eeb40f95c83f717e4e8f5bff1ac82f1c899e9f6d400d67df67214e
* | Fix an assertion fault in json_patch() that can occur if the patch JSONdrh2023-10-11
| | | | | | | | | | is malformed JSONB. Report the malformed JSONB instead. FossilOrigin-Name: a72d54645ca0dd80c60a5ed586049dead3ea7f5fa9ad05c6610a506242a7032a
* | Improved robustness in the decoding of JSON5 text escape sequences founddrh2023-10-10
| | | | | | | | | | in malformed JSONB. FossilOrigin-Name: 35e0108af2bdd830375c31c525f8ed0e8df64959d89649a88402dc1a5c376612
* | Fix an off-by-one error in the changes from the previous check-in ondrh2023-10-10
| | | | | | | | | | the jsonb branch. FossilOrigin-Name: 216191b113da43516d31301fb133173add66358d503677ab997bc82cc88bfea4
* | Improved robustness when translating corrupt JSONB into JSON text.drh2023-10-10
| | | | | | FossilOrigin-Name: 0caa320d9099adbaf98e3719003dbdc4d158abcb3d8a1af20fbcd4c08c970f4a
* | Fix a potential buffer overrun due to corrupt JSONB.drh2023-10-10
| | | | | | FossilOrigin-Name: 5cbb861fc6cb7421a81c957ba9d576e0ae92cb4ed725cdb539b364d66f4ee145
* | Fix bugs uncovered by the fuzzer.drh2023-10-10
| | | | | | FossilOrigin-Name: c96eb7fb618dc0a5aeec8a5e85076475b77dcd56309438aba1f9bddfc8921e3c
* | Systematize the names of some of the translation function in the JSONdrh2023-10-09
| | | | | | | | | | implementation. FossilOrigin-Name: db44bd1d62084ef69c808f7d07e0a25d5a089dcb8b98b1b5d026777591bbdefc
* | Merge the latest trunk fixes and enhancements into the jsonb branch, anddrh2023-10-09
|\| | | | | | | | | especially the JSON cache spill UAF fix. FossilOrigin-Name: 9422c24f4a8b290dcae61e50ec81be5b314b22c61a2bca1e194e47da1316b6e6
| * Fix a potential UAF caused by JSON parser cache spill.drh2023-10-09
| | | | | | | | | | [forum:/forumpost/b25edc1d46|Forum post b25edc1d46]. FossilOrigin-Name: a163fecca90cab9d1b7bf8ebac78d498775eed7b6d81e7920e3401633c3a4b60
* | Remove some unnecessary code. Report errors for invalid JSONB input ondrh2023-10-07
| | | | | | | | | | an extract. FossilOrigin-Name: cbea16c29eb0507f39b5a1cf744a3bb9bb7c71ac156e84a19d03a37cb1816891
* | The return from sqlite3_value_blob() in jsonFuncArgMightBeBinary() mightdrh2023-10-07
| | | | | | | | | | be a NULL pointer. Check for that case. FossilOrigin-Name: 7b52b266b066f1385144c1103a3a411306db5f44568366ae1e93cd8cce799bbc
* | Improved detection of malformed JSONB when parsing it into a JsonNode array.drh2023-10-07
| | | | | | FossilOrigin-Name: ed99a788415e1f8375bd5ec004dd18b1cd0fae4aa94558170882ca487f6dff93
* | Fix the jsonbChangePayloadSize() routine so that it shifts the payload in orderdrh2023-10-07
| | | | | | | | | | | | | | to always render the most compact encoding of the payload size. This is necessary as sometimes (as discovered by dbsqlfuzz) the payload size can grow significantly due to json_insert() or json_replace(). FossilOrigin-Name: 8d6d04ca975ec55c419d40d8463c433b0db698c9fb4812ab9f16d4ee5bee460e
* | Improvements to error messages returned when the ->> operator fails.drh2023-10-07
| | | | | | FossilOrigin-Name: 2f3388f14c843f1c02926e8b929365c06c1f1f4ea6fe6316092c3799c14549d3
* | Improved error messages from search on JSONB.drh2023-10-07
| | | | | | FossilOrigin-Name: 96cfdc31e305406123f6ef1b920423f71902dc4b34381c3efb720274343d37cc
* | Report unknown JSONB element type when parsing JSONB into JsonNode.drh2023-10-07
| | | | | | FossilOrigin-Name: 1f4d3268257bda234c66c3767451b3d39d7b4c7c73a779ad396d9dfc5315905c
* | Correct handling of "raw" strings in JSON. This requires three test-casedrh2023-10-06
| | | | | | | | | | | | changes in TH3 to add double-quotes to the path outputs from json_tree(). The new behavior is correct, I believe. FossilOrigin-Name: ab2bf3e3596dfa7566f4a130adeccbef4056c7321181112a875477193583f30c
* | Improved error detection for JSONB inputs.drh2023-10-06
| | | | | | FossilOrigin-Name: 6945e11aa441ace52b93cdbb81ac45b6f809987f3dbc522251e63f8cb948fddd
* | Incremental improvements to the JSONB logic.drh2023-10-06
| | | | | | FossilOrigin-Name: fe326829c27715e249f727ba797c7df6491e874ec205a0a82ee09c78d61c6e1f
* | Fixes to rendering JSON5 extensions encoded as JSONB.drh2023-10-06
| | | | | | FossilOrigin-Name: 5a17e4479aad2d8313170e5de83a1c52f30b55d9d4fb776024fa6622e175c63b
* | Fix compiler warnings.drh2023-10-06
| | | | | | FossilOrigin-Name: 5227add3c8d509de2e081249163fafdf30ac3173a6d710957f3c3b6f03e7017e
* | Improvements to error handling.drh2023-10-06
| | | | | | FossilOrigin-Name: b41dd237fb6c0dd7daedeaaf81dbc4fdb31cf511fd32cd3d4ee69db34e389915
* | Merge compiler warning fixes from trunk into the jsonb branch.drh2023-10-06
|\| | | | | FossilOrigin-Name: 6409d307915f8969f12df2d5ffa961645bd4db7ccfbd6f52237a217b6a867252
| * Ensure that all fields of static sqlite3_module objects are explicitlydrh2023-10-06
| | | | | | | | | | initialized, in order to hush-up nuisance compiler warnings. FossilOrigin-Name: f3b3d712d6e58b1cb8fdebd2b6b3125080b6b3ac8c7c849a8cc1e5e778d62fe7
* | Improvements to coping with malformed JSONB.drh2023-10-06
| | | | | | FossilOrigin-Name: 563cde404cec4c6559ae0c5fc5edbc878fee874b36562ce2fac5049cc8349343
* | Better error detection when doing a lookup on a JSONB.drh2023-10-05
| | | | | | FossilOrigin-Name: 6e8e0eedbf06e175af6ef230f1ce9a5ad84698b1c6dcd2794d878c746e7b6be4
* | Improvements to comments. No changes to code.drh2023-10-05
| | | | | | FossilOrigin-Name: ac74d7877685006e43684edd6a2d22be8c9857f9f9eb52fc5b3c182d5e2fdb8d
* | Turn an unreachable branch into an assert().drh2023-10-05
| | | | | | FossilOrigin-Name: 0f75199160e48fa8c44f986f1af777adf19e40fbd114a6f58e24d5e6dede779d
* | Fix the parsing of non-standard "Infinity" and "NaN" values from text intodrh2023-10-05
| | | | | | | | | | JSONB. FossilOrigin-Name: df1fbbeb83a2b4a496c9de0d86c7c8c677f8fe3bc770da163dcc1d338a17b58b
* | Change the json_valid(X) routine to return true whenever X is a blob thatdrh2023-10-05
| | | | | | | | | | could plausibly be a valid JSONB. FossilOrigin-Name: 425f0b85a6f8ad0604c4a5faa18efb90436fedb1fe2612a559147c62cff8b7e7
* | Fix the text-to-JSONB parser so that it handles some JSON5 floating pointdrh2023-10-05
| | | | | | | | | | literals correctly. FossilOrigin-Name: 564edb3b6dd752e09e445e3a25c2f5394ceede2a2cdff251d6433dadc0b3644f
* | Slightly stricter testing for when a BLOB is valid JSONB: If the elementdrh2023-10-05
| | | | | | | | | | is a null, true, or false, its payload size must be zero. FossilOrigin-Name: 487781be8a93d9b8d870efb9f25822bb4bbcf9d39d571d1017e9c29043ea515d
* | Fix a memory leak following a syntax error in jsonb().drh2023-10-05
| | | | | | FossilOrigin-Name: bf4b36eda8e200b67041ebdf60fc31d0325bd84185272f8d390c56a91d6ac1ee
* | Allow the PG-style syntax for the PATH operand on the right-hand side ofdrh2023-10-05
| | | | | | | | | | the ->> and -> operators. FossilOrigin-Name: bae5071b0834aa3b7fd4bd871f863e1b148c6558989c8f6cdd02dc4da4770953