]>
git.ipfire.org Git - thirdparty/sqlite.git/log
dan [Fri, 8 Dec 2023 12:04:32 +0000 (12:04 +0000)]
Avoid dropping an error code in new fts5 tokendata=1 code.
FossilOrigin-Name:
a66596e33dc9aa4bab2ec3ff45546e1321d0a11bdc764f8381b315292ca92423
dan [Thu, 7 Dec 2023 21:09:33 +0000 (21:09 +0000)]
Ensure an fts5vocab table never uses a special tokendata=1 merge cursor.
FossilOrigin-Name:
1e26510e83b40c9bd2e8bfa2a0e81f2cb915e78fed773204ef537683e48b61dc
dan [Thu, 7 Dec 2023 20:46:40 +0000 (20:46 +0000)]
Avoid an assert() failure when querying an fts5vocab table that accesses a tokendata=1 fts5 table with corrupt %_data records.
FossilOrigin-Name:
386ba9e20423fb2f623d6adc9d3c310fb1b135f54a1dad15ef3b593d97886926
dan [Thu, 7 Dec 2023 19:08:25 +0000 (19:08 +0000)]
Fix a null-pointer dereference in fts5 tokendata=1 code.
FossilOrigin-Name:
d69fa8f0504887f968d9a190ecb889ddb40bb1b56d0d4479f9819c106aec719b
dan [Thu, 7 Dec 2023 18:41:49 +0000 (18:41 +0000)]
Fix a problem with handling OOM and other errors in fts5 when querying tokendata=1 tables.
FossilOrigin-Name:
bc911ab5953532956510c199be72b1d3c556f2d0ddbd7fc0ae6f5f917b337b48
dan [Thu, 7 Dec 2023 14:41:58 +0000 (14:41 +0000)]
Different fix for the fts5 COMMIT-following-OOM problem first fixed by [
fba3129d ]. This one does not cause problems if an fts5 table is renamed and then dropped within the same transaction.
FossilOrigin-Name:
d8c6b246944934a7a6e027b3f5b986fd64a19dd5c5c5175f4ea8586da59a6764
drh [Thu, 7 Dec 2023 14:09:25 +0000 (14:09 +0000)]
Rework the jsonEachPathLength() routine in json_tree() so that it is
less susceptible to problems due to goofy object labels.
FossilOrigin-Name:
858b76a00e8ff55215f7a2e6a4cd77fc4d4f98dea7224cd90488744f5ce246a4
drh [Thu, 7 Dec 2023 13:14:34 +0000 (13:14 +0000)]
drh [Thu, 7 Dec 2023 12:55:39 +0000 (12:55 +0000)]
Improved detection of corrupt JSONB in the jsonReturnFromBlob() function.
FossilOrigin-Name:
b014736c1f80ccc46fb4b24ac04310a6ce5cb5b6653665efff366cb3bc742257
dan [Wed, 6 Dec 2023 18:34:59 +0000 (18:34 +0000)]
Fix compiler warning about shadowed variable in fts5_index.c.
FossilOrigin-Name:
ee70e4c1c9c41617850228e48d8df44f105cf2fbbe789340ceca6f27ad6ce5eb
drh [Wed, 6 Dec 2023 18:25:41 +0000 (18:25 +0000)]
Work around LLVM's newfound hatred of function pointer casts.
[forum:/forumpost/
1a7d257346636292 |Forum post
1a7d257346636292 ].
FossilOrigin-Name:
ec0ae4030968c782af48d1c776351c14b2ada21d40aeb97915f33df30706e18f
dan [Wed, 6 Dec 2023 18:10:50 +0000 (18:10 +0000)]
drh [Wed, 6 Dec 2023 17:50:16 +0000 (17:50 +0000)]
Do correct comparisons between object labels in JSON even when the two labels
contain different JSON escapes.
FossilOrigin-Name:
bda2e30cc22e180b19a7a05824dd345880eb402ae5450b2d2dd954946c3ae135
drh [Wed, 6 Dec 2023 17:39:31 +0000 (17:39 +0000)]
Correctly handle 8-byte sizes in the JSONB format.
[forum:/forumpost/
283daf08e91183fc |Forum post
283daf08e91183fc ].
FossilOrigin-Name:
73d390f39c0bbbc017e01544e4d43c76761f2599bd57f900131c706270dfd202
drh [Wed, 6 Dec 2023 16:57:18 +0000 (16:57 +0000)]
Fix the routine that determines the json_tree.path value for the first row
so that it correctly takes into account escape sequences in the path
argument.
FossilOrigin-Name:
b9243ee8a37c62eb8848e765bd4af83bc1b3d3eb24fb4268a1357ad1f8b2e1fb
larrybr [Wed, 6 Dec 2023 16:27:29 +0000 (16:27 +0000)]
In CLI, move -interactive flag handling back to arg-loop pass 2.
FossilOrigin-Name:
63cb05a862532d2d56e9e81fe32ced09bf58f03146587a118f11c2a84e195e69
drh [Wed, 6 Dec 2023 15:50:13 +0000 (15:50 +0000)]
Test cases for object label matching with escape sequences.
FossilOrigin-Name:
c6f2aa38e95b7888650cfa7bb773b18a28e01d883033ac77be6d504ffe417d18
drh [Wed, 6 Dec 2023 15:35:38 +0000 (15:35 +0000)]
The rule for the RHS of the ->> and -> operators when the RHS does not begin
with $ is that it must be (1) all digits, or (2) all alphanumerics, or
(3) contained within [..] or else it will become a quoted label.
FossilOrigin-Name:
0e059a546ec11fa5c6d007bd65c249ee2422f1facbdb2792c53e0bc0ccc97e14
drh [Wed, 6 Dec 2023 14:50:48 +0000 (14:50 +0000)]
Increased rigor in comparisons between object labels in JSON.
FossilOrigin-Name:
2bc86d145fccc07107b7753cb1a69122676d4096fe59c454497bd81a6142d45e
dan [Wed, 6 Dec 2023 14:36:34 +0000 (14:36 +0000)]
Add the tokendata=1 option and related APIs to fts5.
FossilOrigin-Name:
a76a636b23c0ebd95d47fdf8358de4729e51a5f68f1a730cd4d89b378e94ac0d
dan [Wed, 6 Dec 2023 14:30:34 +0000 (14:30 +0000)]
stephan [Wed, 6 Dec 2023 12:30:28 +0000 (12:30 +0000)]
README.md typo fix reported in the forum and update all links from http: to https:.
FossilOrigin-Name:
5c48acdbb44185b352b54911a57a6986d6c7e624bdeba2af48b985d29f0292bf
drh [Tue, 5 Dec 2023 19:45:09 +0000 (19:45 +0000)]
Rework the JSON functions so that they use the JSONB format internally.
The original JsonNode parse tree design is removed. All JSON functions
that accept text JSON also accept JSONB. New functions generate JSONB.
FossilOrigin-Name:
7f0c79b94e8f55e5013e52ba64ba8b32dad1dc4e2224d2099733cbc561de1810
drh [Tue, 5 Dec 2023 19:24:07 +0000 (19:24 +0000)]
Use extra assert() statement to silence harmless static analyzer warnings.
FossilOrigin-Name:
174c2b2eef5fecd96a5fc89b81032fe81f7801f12097cea10e7e7f0a02114813
dan [Tue, 5 Dec 2023 18:36:23 +0000 (18:36 +0000)]
Further tests for the new code on this branch.
FossilOrigin-Name:
59d008b6c23ab900377bc696ee19381feb7614bac80546eae361e401c3620c4e
drh [Tue, 5 Dec 2023 18:28:15 +0000 (18:28 +0000)]
Miscellaneous comment cleanup and typo fixes.
FossilOrigin-Name:
59446dc0bd0091572122a3c8b4653d7a2dc867d16c4a5919f79b81bc3a673ce3
drh [Tue, 5 Dec 2023 12:52:13 +0000 (12:52 +0000)]
Use strspn() to accelerate whitespace bypass in the JSON parser.
FossilOrigin-Name:
843197df08352bdff4b87be91d160e574572aded0d0c66142fd960000c0b4701
drh [Tue, 5 Dec 2023 12:22:05 +0000 (12:22 +0000)]
Small performance gain by unwinding the string literal delimiter search
loop in the JSON parser by one more level.
FossilOrigin-Name:
4c587feac153e8ebe526559ec3d254f545f81e8d1ed3126f91a5ff25ec4aa72e
drh [Tue, 5 Dec 2023 12:20:58 +0000 (12:20 +0000)]
drh [Tue, 5 Dec 2023 01:44:15 +0000 (01:44 +0000)]
Use an assert() to fix a harmless static analyzer warning.
FossilOrigin-Name:
a249ca657e624028bc6b3d2c2bcedd7162d118addb7d62ce519920cecebf1860
drh [Tue, 5 Dec 2023 00:17:17 +0000 (00:17 +0000)]
Fix OOM and corrupt JSONB handling in json_patch().
FossilOrigin-Name:
1910feb0b7d5cc2b810c3322f6cca281d8730182d30d162bd7bb56800979ea91
drh [Mon, 4 Dec 2023 23:12:57 +0000 (23:12 +0000)]
Rename the internal routine jsonMergePatchBlob() to just jsonMergePatch().
FossilOrigin-Name:
ebf667b616235bb64b83832008342ba5e7b10b2c170d7cebc431f040fef7ecfb
dan [Mon, 4 Dec 2023 19:48:08 +0000 (19:48 +0000)]
drh [Mon, 4 Dec 2023 19:32:17 +0000 (19:32 +0000)]
Fixes to error handling in json_array_length().
FossilOrigin-Name:
aa85df2d26b74c171c55bde19ef17c4f11f40b8af7181bbf7162f87cdea7e88b
drh [Mon, 4 Dec 2023 19:14:13 +0000 (19:14 +0000)]
Do not make the input JSONB editable in json_remove() if there are no PATH
argument.
FossilOrigin-Name:
66594544f3ba9977475a3e3f74404eb2b2fb845053b28bd24c2b52c7df94e9d7
drh [Mon, 4 Dec 2023 18:53:10 +0000 (18:53 +0000)]
Fix errors in rendering JSON5 escape sequences embedded in JSONB.
FossilOrigin-Name:
f1a51ae3863557526a51c6e98e71fcdf4f1ed14a36212b3c90f7408f926345e4
dan [Mon, 4 Dec 2023 18:45:14 +0000 (18:45 +0000)]
Fixes for xInstToken() with tokendata=0 tables. And with prefix queries.
FossilOrigin-Name:
78fbb71598b1ca756acc078253880a1d0f7983a5a26b9efc683e6488122505a1
dan [Mon, 4 Dec 2023 17:58:56 +0000 (17:58 +0000)]
dan [Mon, 4 Dec 2023 17:45:33 +0000 (17:45 +0000)]
Fix a problem with the xInstCount() API and "ORDER BY rank" queries.
FossilOrigin-Name:
317a50563d9e8586fda136e513727241b414e7267d50a06571c8ebd0eae710bc
drh [Mon, 4 Dec 2023 17:40:28 +0000 (17:40 +0000)]
Continuing simplifications and code cleanup.
FossilOrigin-Name:
ddf92b5059a9106753fd18b82ba8daa269a62af947561c460790107b83416f0b
dan [Mon, 4 Dec 2023 17:05:37 +0000 (17:05 +0000)]
Fix bug in xInstToken() causing the wrong token to be returned.
FossilOrigin-Name:
da78d07e77cbc783fbc725758911c230fd6a1c1885d9576125de955dcc2bd37f
drh [Mon, 4 Dec 2023 16:01:39 +0000 (16:01 +0000)]
drh [Mon, 4 Dec 2023 15:22:42 +0000 (15:22 +0000)]
dan [Mon, 4 Dec 2023 15:08:21 +0000 (15:08 +0000)]
Add tests for using tokendata=1 and contentless_delete=1 together.
FossilOrigin-Name:
a2506b8c9718054912270055638204753c4156bbc115e55194e6df9d7e76cb10
drh [Mon, 4 Dec 2023 13:12:45 +0000 (13:12 +0000)]
Repair issues and inefficiencies found during testing.
FossilOrigin-Name:
ae973cb1515f9d76409c92a2ca2ffd6b71f32b0b490a4886770e7c1b90f12611
drh [Mon, 4 Dec 2023 01:14:23 +0000 (01:14 +0000)]
Better pre-scan size estimations for objects in the JSON parser resulting
in fewer reallocations and memmove operations.
FossilOrigin-Name:
526b27f90897f5e35dfff7257daf6c4ce4798d649b09b8aecfb02df0449e3c51
drh [Mon, 4 Dec 2023 00:31:58 +0000 (00:31 +0000)]
Back off on the use of strlen() for situations where sqlite3_value_bytes()
will work as well, for performance.
FossilOrigin-Name:
79fb54fbb8b9c30f47cdbd437d24a21542716241e822749e5e28c9fbc449bfa8
drh [Sun, 3 Dec 2023 23:38:24 +0000 (23:38 +0000)]
Remove dead code. Improved reporting of errors in JSON inputs.
FossilOrigin-Name:
2eaa738e6b5c1b67b3e57c868d9c3a30eea38a0b3b8b02482f06d57a45b10921
drh [Sun, 3 Dec 2023 23:30:59 +0000 (23:30 +0000)]
Avoid problems when the path argument to json_tree() contains embedded U+0000
characters.
FossilOrigin-Name:
9f055091af01a5dddba1a7e9868ad030c8f206237e1569215cb161e53e54aa71
drh [Sun, 3 Dec 2023 20:11:35 +0000 (20:11 +0000)]
Ensure that OOM conditions in the generation of the "bad JSON path" error
message result in an SQLITE_NOMEM error.
FossilOrigin-Name:
aa0e02b5c26a2ef3d6216a0ed8bc01382be43173485f898cb63f2a8c559f2e74
drh [Sun, 3 Dec 2023 19:59:45 +0000 (19:59 +0000)]
Enable incorrect JSONB to be rendered into text without hitting an
assertion for a bad whitespace escape in a string.
FossilOrigin-Name:
4d6a9a217df6792b41766b774fb0c0553b45f9104c26a0955bf4a30862d7d7bf
drh [Sun, 3 Dec 2023 11:54:39 +0000 (11:54 +0000)]
Do not let bad hexadecimal digits in malformed JSONB cause an assertion fault.
FossilOrigin-Name:
8dec1ba1e5076ff596756e00c1e2ada0245f168a503dd1cadadf848331acfac3
drh [Sun, 3 Dec 2023 00:51:30 +0000 (00:51 +0000)]
Minor code changes for consistency and to simplify testing.
FossilOrigin-Name:
df272bd837910ad9e03e222716a1201a601399664365f1dcf73d5932372518ed
drh [Sat, 2 Dec 2023 21:39:34 +0000 (21:39 +0000)]
Implement strict JSONB checking in the json_valid() function.
FossilOrigin-Name:
0f26d38880fcbc207abcc94dbc170a7428bab1b4f0b7731aaf5bee0224000994
drh [Sat, 2 Dec 2023 20:37:45 +0000 (20:37 +0000)]
Fix harmless compiler warnings reported by MSVC.
FossilOrigin-Name:
419652c0c82980bd043584dcd2976f91dfff7b926b216d597698299850b855c0
dan [Sat, 2 Dec 2023 20:35:04 +0000 (20:35 +0000)]
Fix various compiler warnings and other problems with the new code on this branch.
FossilOrigin-Name:
3a623cfa173b4035c759cb84985d11d8727053beb383648503987d6ab15c0ef0
drh [Sat, 2 Dec 2023 20:25:36 +0000 (20:25 +0000)]
Code and comment cleanup. Everything should work the same.
FossilOrigin-Name:
c640754df0d3ffdad994745f0d0e10c8f19f424b87f6a6e6e269491a0350b950
drh [Sat, 2 Dec 2023 18:17:38 +0000 (18:17 +0000)]
Fix harmless compiler warnings. Refactor some identifier names for
clearer presentation.
FossilOrigin-Name:
7e3941502789c5afaf19b08112f464abf5e3cba7f92fc9290af2a0f96127ad9a
dan [Sat, 2 Dec 2023 18:14:07 +0000 (18:14 +0000)]
When tokendata=1 queries require multiple segment-cursors, allow those cursors to share a single array of in-memory tombstone pages.
FossilOrigin-Name:
e0175d07e4094db5ea4b0378a5ff480dafb6ba9da86a113fa767c4c89c3c866f
drh [Sat, 2 Dec 2023 18:04:27 +0000 (18:04 +0000)]
Take extra care to ensure that JSONB values that are in cache are actually
owned by the JSON subsystem, and that ownership of such values is not handed
back to the bytecode engine.
FossilOrigin-Name:
1304534001e9ef66c6b12752b69d790bfa3427cc803f87cc48ca22ae12df0fdf
dan [Sat, 2 Dec 2023 17:32:16 +0000 (17:32 +0000)]
Ensure that tokendata=1 queries avoid loading large doclists for queries like "common AND uncommon", just as tokendata=0 queries do.
FossilOrigin-Name:
7bda09ab404a110d57449e149a3281fca8dc4cacf7bd9832ea2a1356ad20fe8e
drh [Sat, 2 Dec 2023 16:11:22 +0000 (16:11 +0000)]
drh [Sat, 2 Dec 2023 15:59:48 +0000 (15:59 +0000)]
Do not allow a JsonParse object to be considered "editable" after an OOM.
FossilOrigin-Name:
c6bacf57bd6fe0fee00c9d41163a270b60997c20659949971bbf5c6c62622bfe
drh [Sat, 2 Dec 2023 15:06:43 +0000 (15:06 +0000)]
Fix potential unsigned integer underflow in jsonAppendString().
FossilOrigin-Name:
d2fba2cbdc3870d34228c1a9446eced884325acc183900d7dd0b96132570fb4a
drh [Sat, 2 Dec 2023 14:55:46 +0000 (14:55 +0000)]
Minor fix to the header comment on jsonXlateTextToBlob().
FossilOrigin-Name:
c3677ba410208c07b711f5f526eb5cf039a8eee49f632c7ae04fa55cdfbb9058
drh [Sat, 2 Dec 2023 14:16:47 +0000 (14:16 +0000)]
Performance optimization in jsonAppendString().
FossilOrigin-Name:
fdf00e96239c73fb67e2acecc5b95f55a1fc51c3deed4512613c0d6070ce5805
drh [Sat, 2 Dec 2023 13:36:52 +0000 (13:36 +0000)]
Simplification and optimization of the JSON parser.
FossilOrigin-Name:
f5ec9485119a2a6cb33eb864c7ca9b41d4a2ed08ab6ad9a6b0dd9358ab253576
drh [Sat, 2 Dec 2023 12:23:34 +0000 (12:23 +0000)]
Remove a NEVER that can be true if a virtual table column is declared to have
a DEFAULT. See
[forum:/forumpost/
3d4de8917627d058 |forum post
3d4de8917627d058 ].
FossilOrigin-Name:
8abc2ccaf8106f20243568cd7fa74174386eb85d7ea381201e97e2fd527033e0
drh [Sat, 2 Dec 2023 01:38:53 +0000 (01:38 +0000)]
Unroll a loop in the parser for a performance increase.
FossilOrigin-Name:
a6dc29e4d5e13949e0fcd9d5dde575c2670eb10a230ab9df3806fc8c3016c540
drh [Sat, 2 Dec 2023 01:06:33 +0000 (01:06 +0000)]
Fix harmless compiler warnings and enhance performance the parser.
FossilOrigin-Name:
285633da6d188547e52f07779e209c9e5f3dc33ce0668e14858f3337889ef4b8
drh [Fri, 1 Dec 2023 22:01:26 +0000 (22:01 +0000)]
Performance optimization in the JSON parser.
FossilOrigin-Name:
68d191f40e708962ec88e0c245b4496bc4a671300484b1cc0f3fc7e6d199a6e6
dan [Fri, 1 Dec 2023 20:37:11 +0000 (20:37 +0000)]
dan [Fri, 1 Dec 2023 20:10:20 +0000 (20:10 +0000)]
dan [Fri, 1 Dec 2023 20:09:59 +0000 (20:09 +0000)]
Different approach to querying a tokendata=1 table. Saves cpu and memory.
FossilOrigin-Name:
c523f40895866e6fc979a26483dbea8206126b4bbdf4b73b77263c09e13c855e
drh [Fri, 1 Dec 2023 18:49:02 +0000 (18:49 +0000)]
drh [Fri, 1 Dec 2023 18:46:14 +0000 (18:46 +0000)]
drh [Fri, 1 Dec 2023 13:28:13 +0000 (13:28 +0000)]
Cache is working better, but does not preserve the hasJson5 flag.
FossilOrigin-Name:
a12add7ab9f5aee5bb2ede0c4d22e599dd28f7a107dce72b2ea48ef92d233e8a
drh [Fri, 1 Dec 2023 12:57:12 +0000 (12:57 +0000)]
First attempt to get the JSON text-to-binary cache working. All test cases
pass, but the cache seems not to help much.
FossilOrigin-Name:
25ed295f300fea6185104a73721076bccd2b2a6e411c78564266fa6dca4ff70c
drh [Thu, 30 Nov 2023 23:36:14 +0000 (23:36 +0000)]
Remove all trace of JsonNode from the JSON implementation. The JSONB format
is used as the internal binary encoding for searching and editing.
FossilOrigin-Name:
11ebb5f712cc7a515e2e0f2be8c1d71de20c97fe5b74c4f4d72c84fd21182d35
drh [Thu, 30 Nov 2023 20:57:48 +0000 (20:57 +0000)]
Convert json_valid() over to using only JSONB as its internal format.
FossilOrigin-Name:
7b5756fa6d00b093bf083a8d7a5ef5485f7a09e4eac473785c8380688f861a1b
stephan [Thu, 30 Nov 2023 20:34:24 +0000 (20:34 +0000)]
Add a basic batch-mode SQL runner for the SAH Pool VFS, for use in comparing it against WebSQL. Bring the WebSQL batch runner up to date, noting that it cannot run without addition of an "origin trial" activation key from Google because that's now the only way to enable WebSQL in Chrome (that part is not checked in because that key is private). Minor code-adjacent cleanups.
FossilOrigin-Name:
883990e7938c1f63906300a6113f0fadce143913b7c384e8aeb5f886f0be7c62
drh [Thu, 30 Nov 2023 19:29:56 +0000 (19:29 +0000)]
Convert json_type() to use JSONB internally.
FossilOrigin-Name:
83074835b900ce85cf67059e674ce959801505c37592671af25ca0af7ed483f1
drh [Thu, 30 Nov 2023 19:11:14 +0000 (19:11 +0000)]
Convert json_insert(), json_replace(), and json_set() over to using only
JSONB internally.
FossilOrigin-Name:
4e2083e86f19ef7634f0b253fb924e52014b43ed0ce8acc51c36f3c5682180a6
drh [Thu, 30 Nov 2023 19:06:27 +0000 (19:06 +0000)]
Enhance json_set() and json_insert() so that they create missing
substructure.
FossilOrigin-Name:
cc7a641ab5ae739d31c24f0ad0caeb15a481a63fa8f13720718ea922c25862ff
drh [Thu, 30 Nov 2023 16:17:09 +0000 (16:17 +0000)]
Simplification of the new JSON insert/set test cases.
FossilOrigin-Name:
04c0d5644372446c924a2e31a26edf51ddc563a1990d170b0ed4739e3e8b239b
drh [Thu, 30 Nov 2023 16:16:10 +0000 (16:16 +0000)]
New JSON test cases showing insert or set with missing substructure.
FossilOrigin-Name:
6802b6459d0d16c961ff41d240a6c88287f197d8f609090f79308707490a49c2
drh [Thu, 30 Nov 2023 12:04:14 +0000 (12:04 +0000)]
New test cases for insert/set/replace with paths that indicate substructure
that does not yet exist.
FossilOrigin-Name:
146c717c51940b2139befc45ac74e7a1c36ef3c32fd3cfe35b334488eebe6298
stephan [Thu, 30 Nov 2023 10:00:25 +0000 (10:00 +0000)]
Update some OPFS-related help text in WASM tests. Minor cleanups in speedtest1-worker.js.
FossilOrigin-Name:
263f6d3a7784ef7d032dbf7a3265aca8dd70bf50797f28f6b2e8ddb6a301f83a
drh [Thu, 30 Nov 2023 00:52:33 +0000 (00:52 +0000)]
Convert json_insert(), json_replace(), json_set() to use JSONB internally.
Mostly working, but some corner cases are still not quite right.
FossilOrigin-Name:
99c8f6bd5c9a31b6d00f92e383bec8a8235ed553916ad59adbb1b7663f6ebff1
drh [Wed, 29 Nov 2023 20:06:49 +0000 (20:06 +0000)]
Convert the json_error_position() routine to use only JSONB internally.
FossilOrigin-Name:
e7a8ba35bff6fde55827f978de5b343b6c134c7fa53827f5c63915a9dc2598ad
drh [Wed, 29 Nov 2023 17:36:54 +0000 (17:36 +0000)]
The json_patch() function now operates exclusively on JSONB. This patch
also includes improvements to JSONB debug printing routines.
FossilOrigin-Name:
fee19d0098242110d2c44ec7b9620c1210ef3f87913305f66ec85d277dd96ab6
dan [Wed, 29 Nov 2023 16:22:39 +0000 (16:22 +0000)]
drh [Wed, 29 Nov 2023 13:47:46 +0000 (13:47 +0000)]
In the recovery extension, if a payload size is unreasonably large, it is
probably corrupt, so truncate it.
FossilOrigin-Name:
988c3179e978a3a6d42541e9c7a2ab98150383671810926503376ed808f150ff
drh [Wed, 29 Nov 2023 12:18:02 +0000 (12:18 +0000)]
Merge all the latest trunk enhancements into the jsonb branch.
FossilOrigin-Name:
1a59fcab2179cc3b52ecd3de7d2018db96ac149aaff521959773a517b8d9ac3e
drh [Wed, 29 Nov 2023 02:45:09 +0000 (02:45 +0000)]
The assertion change at check-in [
7946c79567b0ccd3 ] is insufficient to fix
the problem of a Table object being deleted out from under the OP_VCheck
opcode. We need to reference count the Table, which is accomplished here.
FossilOrigin-Name:
cad269d5e274443c39203a56603b991accc0399135d436996fc039d1d28ec9db
drh [Wed, 29 Nov 2023 01:38:15 +0000 (01:38 +0000)]
Convert the json_array_length() function to use JSONB instead of JsonNodes.
FossilOrigin-Name:
5ab790736d943e08f097efcee5cfbf0d83c65b0a53f273060330ba719affa5e5
drh [Tue, 28 Nov 2023 23:26:55 +0000 (23:26 +0000)]
Fix all known problems with JSONB json_extract().
FossilOrigin-Name:
d5f48c57e975ac468cf29a43a5d0b56ef6d06cf35a8b0bddf87ec1c0fc7ae028
drh [Tue, 28 Nov 2023 23:18:04 +0000 (23:18 +0000)]
Do not set the J subtype when the output is JSONB.
FossilOrigin-Name:
4f106b64fe8988435872806bd0a6c223b61f53af0dd1c47c847bb4eec4e03e27
drh [Tue, 28 Nov 2023 20:33:20 +0000 (20:33 +0000)]
Preserve flexibility in the format of the RHS of -> and ->> operators found
in legacy.
FossilOrigin-Name:
6231ec43adb7436195eb1497de39a6c13c6b4f1c5032e6ea52515d214e61fdbc
drh [Tue, 28 Nov 2023 20:25:23 +0000 (20:25 +0000)]
Attempt to get json_extract() working with pure JSONB only, and without
the use of JsonNode. Mostly working, but there are some differences from
legacy in corner cases.
FossilOrigin-Name:
8c324af1eca27e86adc45622af4f3b06a67a3f968596ac58aa7434b1f6f05f3c