drh
59ded6b5f1
Improved robustness when translating corrupt JSONB into JSON text.
...
FossilOrigin-Name: 0caa320d9099adbaf98e3719003dbdc4d158abcb3d8a1af20fbcd4c08c970f4a
2023-10-10 18:42:08 +00:00
drh
d88f378c7d
Fix a potential buffer overrun due to corrupt JSONB.
...
FossilOrigin-Name: 5cbb861fc6cb7421a81c957ba9d576e0ae92cb4ed725cdb539b364d66f4ee145
2023-10-10 18:32:14 +00:00
drh
064c1688da
Fix bugs uncovered by the fuzzer.
...
FossilOrigin-Name: c96eb7fb618dc0a5aeec8a5e85076475b77dcd56309438aba1f9bddfc8921e3c
2023-10-10 18:04:40 +00:00
drh
cc5e612db4
Merge the latest trunk enhancements into the jsonb branch.
...
FossilOrigin-Name: f93f16c94d0a58dfa90939e84aba048be958c7b085b45a6f25c2243fdf79b3aa
2023-10-10 17:34:41 +00:00
drh
853fb5e723
Fix a bug in the mkautoconfamal.sh script, introduced by check-in [3308fdda4b81c110]
...
so that the "snapshot-tarball" and "amalgamation-tarball" makefile targets
work again when run from outside of the source tree.
FossilOrigin-Name: 65ccf5fef812d43aed9e00af36c90e1a499d197e30148753790445e25ee1324c
2023-10-10 15:33:05 +00:00
stephan
0b29d37ef9
Start adding tests for the second JNI layer.
...
FossilOrigin-Name: 0177f4dfe8a5c03c1d5dd279c6babe5a87b596c2351373f845b89fc6abf7947b
2023-10-10 12:16:04 +00:00
drh
aaf1341dcd
Use snprintf() in place of sprintf() in a debugging function in the CLI.
...
FossilOrigin-Name: 5e5e4d2b4958c329578d1e5af4ed25c1b774f0ed2d15fa6747d7d7fbbba4fa46
2023-10-09 22:45:10 +00:00
drh
f32aa34346
Systematize the names of some of the translation function in the JSON
...
implementation.
FossilOrigin-Name: db44bd1d62084ef69c808f7d07e0a25d5a089dcb8b98b1b5d026777591bbdefc
2023-10-09 18:33:01 +00:00
dan
6c96bf2c3f
Avoid calling sqlite3_randomness and taking the PRNG mutex when writing a journal header in "journal_mode=memory" mode.
...
FossilOrigin-Name: c84e4483cb44f827416d8caafa22f076b2f31b2024fe8c5b5bcb0c9955149d11
2023-10-09 17:54:34 +00:00
drh
01a5a19919
Add a TCL script that does various verification checks on the source tree
...
to make sure that generated code has been updated correctly.
FossilOrigin-Name: 1f1a358af77f4386f98010eeae8487e6d39548a6dfe58c2664552490e7661122
2023-10-09 14:56:15 +00:00
drh
7e60f6dbf1
Fix a compiler warning caused by the previous check-in.
...
FossilOrigin-Name: 7e8768bf8b4002b1c287f2bc95262548e2ae81b437936154f2bb1ea1f739a904
2023-10-09 14:47:25 +00:00
drh
50da20d5b1
Turn on SEH by default when building using MSVC.
...
FossilOrigin-Name: f57e8275cf1ab3ad8027044cda0893282d1c403a5aa9fabbb1c7de280597b5cd
2023-10-09 14:05:21 +00:00
drh
0dead8d3d1
Merge the latest trunk fixes and enhancements into the jsonb branch, and
...
especially the JSON cache spill UAF fix.
FossilOrigin-Name: 9422c24f4a8b290dcae61e50ec81be5b314b22c61a2bca1e194e47da1316b6e6
2023-10-09 12:57:03 +00:00
drh
faef28e6bd
Fix a potential UAF caused by JSON parser cache spill.
...
[forum:/forumpost/b25edc1d46|Forum post b25edc1d46].
FossilOrigin-Name: a163fecca90cab9d1b7bf8ebac78d498775eed7b6d81e7920e3401633c3a4b60
2023-10-09 12:46:53 +00:00
stephan
66dacae4c3
Flesh out the error state captured by SqliteException.java. Doc additions.
...
FossilOrigin-Name: 5c5397ff15543f4b3620244d9e57e15708eafcab1d42c9f87b4a60f0c01e8858
2023-10-09 12:45:28 +00:00
drh
4a11142072
Fix harmless compiler warning in the test module for sessions.
...
FossilOrigin-Name: 3d5ec99397c183cfb8c5d31e1967e0df8a4d6edbea92bbdf728571e3a6a36d68
2023-10-09 12:39:59 +00:00
stephan
c8f829cdac
Add JNI Sqlite and SqliteException classes. Add Tester2.java as the main test app for the high-level API.
...
FossilOrigin-Name: 6acf52be7abce8dcf434c5ebf0d5e88859b033e6418077846247ecf00ccf9381
2023-10-09 11:46:32 +00:00
stephan
fd013682d6
Minor JNI doc and public/private cleanups.
...
FossilOrigin-Name: c49d36ece283274963ce2e5a4db1e8f586dffa22e47f4adb93c625f918c3fd5d
2023-10-09 10:44:10 +00:00
stephan
68585ea342
Rename SQLite3Jni to CApi to (A) reduce name prefix collisions with incoming classes and (B) align with its counterpart in the JS build. Remove the Canonical annotation because (A) the new code separation will inherently make that distinction and (B) the line between truly canonical and semi-canonical (e.g. differing in signature overloads) is blurry enough that consistent use of that annocation is becoming an unnecessary burden.
...
FossilOrigin-Name: ca216b4486aff7d206ebfc3a5e84d48919c282425d4313396bc19313ffca8a0e
2023-10-09 10:30:54 +00:00
drh
a7e9386e88
Remove some unnecessary code. Report errors for invalid JSONB input on
...
an extract.
FossilOrigin-Name: cbea16c29eb0507f39b5a1cf744a3bb9bb7c71ac156e84a19d03a37cb1816891
2023-10-07 23:35:07 +00:00
drh
de8ccf00fb
The return from sqlite3_value_blob() in jsonFuncArgMightBeBinary() might
...
be a NULL pointer. Check for that case.
FossilOrigin-Name: 7b52b266b066f1385144c1103a3a411306db5f44568366ae1e93cd8cce799bbc
2023-10-07 19:46:22 +00:00
drh
3efb2c4791
Improved detection of malformed JSONB when parsing it into a JsonNode array.
...
FossilOrigin-Name: ed99a788415e1f8375bd5ec004dd18b1cd0fae4aa94558170882ca487f6dff93
2023-10-07 19:40:20 +00:00
drh
f26833d783
Fix the jsonbChangePayloadSize() routine so that it shifts the payload in order
...
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
2023-10-07 19:05:10 +00:00
drh
1244b6cbf6
Improvements to error messages returned when the ->> operator fails.
...
FossilOrigin-Name: 2f3388f14c843f1c02926e8b929365c06c1f1f4ea6fe6316092c3799c14549d3
2023-10-07 17:50:06 +00:00
dan
3b381b4afc
Fix a problem with sqlite3changegroup_schema() and patchsets.
...
FossilOrigin-Name: c4ab4200dc2538e1132d87d70fd309b26b0da8a918fede1cb09b567ea40ec889
2023-10-07 17:29:10 +00:00
dan
4bdcfc6666
Add the sqlite3changegroup_schema() API. To allow changegroup objects to upgrade the schema of a changeset/patchset under some circumstances.
...
FossilOrigin-Name: 03f9e50b15c9c2fb4636dee24c1491c45322578b9fed08c6f4360be07c5c3830
2023-10-07 16:32:02 +00:00
dan
18efe17553
Fix a problem with the changes on this branch and tables that use an implicit primary key.
...
FossilOrigin-Name: 1f9d10235ff32e72074be695049567135b02e681068ce117b66adc14a6214449
2023-10-07 16:07:02 +00:00
drh
502b11c6d3
Merge the memory leak fix from trunk.
...
FossilOrigin-Name: 358de1b09f3d5ec0fe459775b0a2a99dfa235817327016b472aaa1ed56d952e6
2023-10-07 11:37:00 +00:00
drh
bae197c175
Improved error messages from search on JSONB.
...
FossilOrigin-Name: 96cfdc31e305406123f6ef1b920423f71902dc4b34381c3efb720274343d37cc
2023-10-07 11:36:16 +00:00
drh
522e880bc2
Report unknown JSONB element type when parsing JSONB into JsonNode.
...
FossilOrigin-Name: 1f4d3268257bda234c66c3767451b3d39d7b4c7c73a779ad396d9dfc5315905c
2023-10-07 09:13:59 +00:00
drh
8f0634549c
Add a test case to prevent a regression of the leak fixed in the previous
...
trunk check-in.
FossilOrigin-Name: f99ff655d09763c4a22d065041644ece793d84c82c644931e89ccf50c4f4564a
2023-10-07 08:15:47 +00:00
drh
43e232dc47
Fix a resource leak: sqlite3_blob_reopen() was failing to invoke the
...
xDel() distructor on a register when it sets that register to the new
rowid. This was never a problem prior to the large-column cache of
[771fe35074b50b8d] as that destructor was always a no-op.
dbsqlfuzz cd96368deaece480fb94d42427dde053737a650e.
FossilOrigin-Name: 545edd5ecf20a7feb99dc5ce6f338fa1f172c2e17b240cbede497f0729dbd3d7
2023-10-07 08:00:54 +00:00
drh
11aa2adca3
Correct handling of "raw" strings in JSON. This requires three test-case
...
changes in TH3 to add double-quotes to the path outputs from json_tree().
The new behavior is correct, I believe.
FossilOrigin-Name: ab2bf3e3596dfa7566f4a130adeccbef4056c7321181112a875477193583f30c
2023-10-06 23:02:06 +00:00
drh
6b8aa95c3c
Improved error detection for JSONB inputs.
...
FossilOrigin-Name: 6945e11aa441ace52b93cdbb81ac45b6f809987f3dbc522251e63f8cb948fddd
2023-10-06 22:16:09 +00:00
dan
83e43dc757
Add missing source code comments and fix other issues with the new code on this branch.
...
FossilOrigin-Name: df39fbe9ab87937beb77af353cd55602290b185e222e0a92a3ebf9a9a0b9e2e7
2023-10-06 20:39:42 +00:00
dan
9fc208aada
Update this branch with latest changes from the trunk.
...
FossilOrigin-Name: 897e926a5eaa0eab7e09e5003e4c15c974897be298a18ae85345962dc3f410a1
2023-10-06 19:46:19 +00:00
dan
53e91a5e22
Add tests for the sqlite3changegroup_schema() API.
...
FossilOrigin-Name: 5dab481c101b1523b1cfde92678cbc654ea26d946bf29da372d71c1f89cbaf46
2023-10-06 19:01:43 +00:00
drh
7b4349735f
Incremental improvements to the JSONB logic.
...
FossilOrigin-Name: fe326829c27715e249f727ba797c7df6491e874ec205a0a82ee09c78d61c6e1f
2023-10-06 18:21:47 +00:00
drh
98dbfa69d3
Fixes to rendering JSON5 extensions encoded as JSONB.
...
FossilOrigin-Name: 5a17e4479aad2d8313170e5de83a1c52f30b55d9d4fb776024fa6622e175c63b
2023-10-06 15:35:42 +00:00
drh
e690d5ad80
Fix compiler warnings.
...
FossilOrigin-Name: 5227add3c8d509de2e081249163fafdf30ac3173a6d710957f3c3b6f03e7017e
2023-10-06 14:59:40 +00:00
drh
e1e2f2dcc5
Improvements to error handling.
...
FossilOrigin-Name: b41dd237fb6c0dd7daedeaaf81dbc4fdb31cf511fd32cd3d4ee69db34e389915
2023-10-06 14:52:49 +00:00
drh
91f3cd9874
Merge compiler warning fixes from trunk into the jsonb branch.
...
FossilOrigin-Name: 6409d307915f8969f12df2d5ffa961645bd4db7ccfbd6f52237a217b6a867252
2023-10-06 13:05:42 +00:00
drh
00eee7a786
Remove an unused parameter from the recomputeColumnsNotIndexed() routine in
...
order to squash a harmless compiler warning.
FossilOrigin-Name: 9bf4bfd68080367b58594e0d44b110b3ee9766420f648537fd7bc638dacefb72
2023-10-06 12:55:53 +00:00
drh
1935887a68
Ensure that all fields of static sqlite3_module objects are explicitly
...
initialized, in order to hush-up nuisance compiler warnings.
FossilOrigin-Name: f3b3d712d6e58b1cb8fdebd2b6b3125080b6b3ac8c7c849a8cc1e5e778d62fe7
2023-10-06 12:51:05 +00:00
drh
03f7e42538
Remove and unused static variable from shell.c.in in order to silence a
...
harmless compiler warning.
FossilOrigin-Name: 477577120b897bf15edc2a85e220d5c64a1d5a245354939269f6753d8140ac95
2023-10-06 12:22:14 +00:00
drh
568643fd15
Increase the size of some variables associated with the PMA sorter in order
...
to avoid any possibility of a signed integer overflow.
[https://bugs.chromium.org/p/chromium/issues/detail?id=1489025 |Chromium fuzzer issue 1489025].
FossilOrigin-Name: dc3be3af471d90dd810c1e2cc59e83cf6a57f01971b1258ea0da402e4d577ef2
2023-10-06 12:15:01 +00:00
drh
dd7f09e6c0
Improvements to coping with malformed JSONB.
...
FossilOrigin-Name: 563cde404cec4c6559ae0c5fc5edbc878fee874b36562ce2fac5049cc8349343
2023-10-06 00:06:26 +00:00
drh
27401d38d8
Better error detection when doing a lookup on a JSONB.
...
FossilOrigin-Name: 6e8e0eedbf06e175af6ef230f1ce9a5ad84698b1c6dcd2794d878c746e7b6be4
2023-10-05 23:05:35 +00:00
drh
f7af8f3270
Improvements to comments. No changes to code.
...
FossilOrigin-Name: ac74d7877685006e43684edd6a2d22be8c9857f9f9eb52fc5b3c182d5e2fdb8d
2023-10-05 22:52:43 +00:00
drh
dac2707152
Turn an unreachable branch into an assert().
...
FossilOrigin-Name: 0f75199160e48fa8c44f986f1af777adf19e40fbd114a6f58e24d5e6dede779d
2023-10-05 20:17:01 +00:00