drh
01acfd5805
Fix a memory leak following a syntax error in jsonb().
...
FossilOrigin-Name: bf4b36eda8e200b67041ebdf60fc31d0325bd84185272f8d390c56a91d6ac1ee
2023-10-05 15:05:33 +00:00
drh
9061e22a05
Allow the PG-style syntax for the PATH operand on the right-hand side of
...
the ->> and -> operators.
FossilOrigin-Name: bae5071b0834aa3b7fd4bd871f863e1b148c6558989c8f6cdd02dc4da4770953
2023-10-05 15:02:00 +00:00
drh
0f921e2bac
Merge trunk enhancements into the jsonb branch.
...
FossilOrigin-Name: be5907b648386e05530d1e321e2a3e563e07e99f08373aaf9a3452adc9228dc3
2023-10-05 11:22:16 +00:00
drh
5d9446d100
Improved detection of corrupt databases in balance_nonroot().
...
dbsqlfuzz d1cf013c50a620b68c2a5bd240d29afd65e5f58e.
FossilOrigin-Name: a2464bbb825b5976ef974a2e6c17ea150f5e6fcd0dd0f144b9f9c1c22a9c9c82
2023-10-05 11:06:10 +00:00
stephan
a357bdbfc4
Do not squelch exceptions from SAHPool VFS importDb() - rethrow them. Problem reported in [forum:c80fc578809b80a3|forum post c80fc578809b80a3].
...
FossilOrigin-Name: 325bcdea4a436e514d83095d3893caf07a714b718e1b643507179b101c108e3b
2023-10-05 11:04:49 +00:00
drh
3a3912f21c
Remove a stray blank line from the beginning of btree.c. No functional
...
code changes.
FossilOrigin-Name: c89983dcfc208faa86b31717144c069572598e9770228264d69a044a84bde277
2023-10-05 10:35:51 +00:00
drh
10e751937c
The Makefile distinguishes between tcl8.4 and tcl8.5. Some makefile targets
...
require tcl8.5, but others (ex: "sqlite3.c", "shell.c", and "sqlite3") require
only tcl8.4.
FossilOrigin-Name: 770308db9776b8c0a70b8807463e89a9eddfe5552e25e67324cd303dc974f50e
2023-10-04 12:49:08 +00:00
drh
57996f53e4
Modify the main makefile so that it fails with an error if the tclsh found
...
by ./configure is not tclsh 8.5 or later.
[forum:/forumpost/4380363682708ece|Forum post 4380363682708ece].
FossilOrigin-Name: 1765f3b5a00a8ca20a7b9e18ac7f9d7de0679470b234b83aea83aa5b4d4d34e6
2023-10-04 11:52:44 +00:00
drh
4500d87e76
Fix a memory leak in JSON group-aggregates when the output is JSONB.
...
FossilOrigin-Name: 08e7db138b636890cb29a76d65c2069c6e2ff44470fa4bca14f4526fe5f195ae
2023-10-03 22:40:22 +00:00
drh
f362731c1c
Fix a bug in the jsonReturnFromBlob() function that causes a positive result
...
for a negative value for when a JSON integer is too large and needs to be
converted into double.
FossilOrigin-Name: dca684da0c29ec78460362f972ea7747be42c13c4d1325da9d62c1ea58022e39
2023-10-03 21:54:09 +00:00
drh
51cc3041fe
Fix problems in the "json" output column of the json_tree() virtual table
...
for the case when the input is JSONB.
FossilOrigin-Name: fefa4475c496aab32fe7b9cc203747ce4faf7448da4f29b807e5486c7686238d
2023-10-03 20:58:39 +00:00
drh
6e737b9252
Improved handling of OOM while translating the JsonNode representing into
...
the BLOB representation.
FossilOrigin-Name: ef5956710bb542d6045c82937d02218a7ed45af94cf3959b0c180268e04d14e1
2023-10-03 19:37:19 +00:00
drh
f0c129f247
Merge the latest trunk enhancements into the jsonb branch.
...
FossilOrigin-Name: e6406a9865b75dea2f26d3ee4f4c206958400059c7f92ced88edc8507dd3c82f
2023-10-03 11:36:47 +00:00
drh
ee0f6777f9
Fix a problem in the JSONB parser that comes up following an OOM.
...
FossilOrigin-Name: 355acfb18897254f6b6444a21d781b5e10e930b81952850dd2a40d88bbf2f3db
2023-10-03 10:59:01 +00:00
drh
8405e1140a
Fix an issue with the use of jsonb_group_array() and jsonb_group_object()
...
when used by window functions.
FossilOrigin-Name: 808bd349ba587fbcdc4aea3f9c08e0df01ba08dec181c5af5ea157e89d86ff7b
2023-10-03 10:43:30 +00:00
drh
313336f90b
New test cases for JSONB.
...
FossilOrigin-Name: 6d4aeff5751722c83ebb0e1f21072b72be418c64dcf28ee032d3a548e1b3a951
2023-10-02 23:56:46 +00:00
drh
e5c384e9a5
Fix jsonb_insert() so that it does not behave like jsonb_set().
...
New test cases added.
FossilOrigin-Name: 54197149b811d30b6c4487eedf5692b164ed0f90cfcc541aa3157094f5f17f6a
2023-10-02 20:16:06 +00:00
stephan
4f65a3cec9
JNI: when fetching text-or-blob/length pairs, fetch the text-or-blob first, then the length, as the API docs suggest.
...
FossilOrigin-Name: e4f9d3946fa570bccea2de17c5536901bdabd46cfe25678fdd37ba0e2bfd99b1
2023-10-02 17:12:16 +00:00
drh
51e3f7a1c3
Fix the length of the string in the new concat() and concat_ws() functions.
...
FossilOrigin-Name: 325243226520376f4a142864ae3fb98866f25bff4dc50a6b648ef98428a7169f
2023-10-02 17:06:28 +00:00
drh
43d71eb892
Remove an ALWAYS() from a branch that can in fact be false following an OOM
...
fault.
FossilOrigin-Name: 3a1feb1c469d3dd50e2558581199b16bfd59b9d5bcb0de5f1a8f0ec30a17b4d1
2023-10-02 15:56:37 +00:00
drh
dee29e8c7a
New test cases for JSONB.
...
FossilOrigin-Name: d624c31e5c49e1ce63b4b72caa42a61c5167866f47d842fbcfe4e826fd079d7c
2023-10-02 14:51:28 +00:00
stephan
041fb16631
Pointer-casting-related fixes for JNI on 32-bit ARM (pi4 armv7l).
...
FossilOrigin-Name: 54441039ae3ebe39e42f008f77ce1be117cbda6daeed8b01739ad42a3c1f0754
2023-10-02 14:44:28 +00:00
drh
c97407fdba
Allow json_replace() to accept JSONB arguments as the new value.
...
FossilOrigin-Name: 95eb7b37fab29931924311f541d52173ef77a448efc8771b1a1783ccd786d23d
2023-10-02 13:35:06 +00:00
drh
8eeafb7544
Improvements to error handling for BLOB inputs on JSON.
...
FossilOrigin-Name: 14f20ecbfab44934e86f1ac7a3f745b989aa8190c6df119ff5aa8100fa248d93
2023-10-02 13:20:43 +00:00
drh
5624b0b4cd
Gather forward references into a single place for the JSON code. Allow
...
JSONB arguments to json_array() and json_object() and similar.
FossilOrigin-Name: c352201b8c299c330d9abbff6dbcbcbcf00ada53183d3cd91020ec772e066357
2023-10-02 12:40:04 +00:00
drh
9b176f863b
Fix problems following OOM in JSONB parsing.
...
FossilOrigin-Name: 0d8cd6b5fb592f88f593ceaad9cdfa95dcfdf14169c3a56a5becbd66d62fd02b
2023-10-01 18:59:34 +00:00
stephan
dc13d74140
Add JNI binding for sqlite3_normalized_sql().
...
FossilOrigin-Name: 2532e5662a2bbb3e6b4c4be3fad035734b684bdf59b178cb64b444ca6d8b956b
2023-10-01 12:15:38 +00:00
stephan
ec15e551f9
Make JNI binding of sqlite3_value_frombind() return boolean instead of int and add tests for it.
...
FossilOrigin-Name: 906e2ed3e9647f5c2355e9fea2beee141767cae7016da9fa1fe88283726b9369
2023-10-01 11:53:40 +00:00
stephan
f046b82324
Fix JNI binding to compile without SQLITE_ENABLE_PREUPDATE_HOOK. Add build option to disable all optional ENABLE flags.
...
FossilOrigin-Name: c04022b7407f77eaf0175e831ebcd6bbdc0af1cef0d42c5c11102aa8484f24ca
2023-09-30 17:08:29 +00:00
drh
d8f26350a0
Restore the trunk version of sqlite3_user_data(). Fix the xColumn for virtual
...
tables so that the sqlite3_context contains a valid but NULL user data pointer.
FossilOrigin-Name: 15ffd932fecc82a5791b2024f55d2ec80887e8eb7345de68d6f5cac4912cfbe8
2023-09-30 16:50:17 +00:00
stephan
d1878bed86
Make all SQLite3Jni methods which take a void-pointer-as-long-int argument explicitly package-private, as they're always for internal use only even if SQLite3Jni is eventually made public.
...
FossilOrigin-Name: 5e387275f69ab2d3159b4b67b8cbfc6270410b61e5ac1f988616e8d051f6572e
2023-09-30 16:19:57 +00:00
stephan
41c6232e54
JNI: rename sqlite3_errmsg16() to sqlite3_errmsg(), as the 16 suffix is superfluous there.
...
FossilOrigin-Name: df25b21689de84b7b8c940df39461d3d88f592f0ba2dddcfcbb0bebcea6ee7da
2023-09-30 14:48:21 +00:00
stephan
0018ef15a3
Expose sqlite3_stmt_busy() to JNI.
...
FossilOrigin-Name: 5733aa5fe341d50b84baebd8803a86e381bb95959a8bc733b8fff6fd4e732867
2023-09-30 14:34:55 +00:00
drh
7e86d3fc69
Finish adding jsonb_ versions for all JSON routines that return JSON text.
...
FossilOrigin-Name: 6daa7b69695e1b68dba317abbcad4d0205c91963d4a9eb2d595a3ec10fa0fdf4
2023-09-30 14:34:39 +00:00
stephan
8f43696c8a
Correct an undefined-value deref in the JS bindings, triggered by passing invalid args and then tripping over an undefined value while trying to report that. Reported in [forum:dd42df144651d779|forum post dd42df144651d779].
...
FossilOrigin-Name: fd4632540717c4771ac9ae1fe4400091a2cd0553639bf809abaf4ecbc54de4f0
2023-09-30 13:13:23 +00:00
stephan
9ac7e2d0fc
Make (almost) all SQLite3Jni.sqlite3_... members public but make the SQLite3Jni class package-private, which has the same foot-protection effect but makes it much simpler to patch SQLite3Jni to publicize the interface later. Remove some of the extraneous foot-shooting protection from indidivual functions, in lieu moving it to the still-pending higher-level interfaces.
...
FossilOrigin-Name: 082b86683e77b2d4a30e1515552f52511324ef97c43b622b4dab7975ae9fbd7d
2023-09-30 10:59:18 +00:00
stephan
008b62f1ae
Merge in and close jni-ptr-passing branch. The remaining pointer-passing adaptation can be done incrementally without affecting the interface.
...
FossilOrigin-Name: 7927c42410ba0d5fc8e6e08caaa5cbaaeb359869f17d1afaa082f1aa47fdb2fc
2023-09-30 10:37:36 +00:00
stephan
d1ce2755f0
Make all native JNI sqlite3_...() bindings package-private as a foot-shooting protective measure (higher-level pre-native-call argument validation is largely pending). Move SQLTester.java and TesterFts5.java into the org.sqlite.jni package so that they can access the being-tested methods.
...
FossilOrigin-Name: ec82f7251acab7df40755ef5f456f36fe49b59e63a20be59bd610fc4280ba8cd
2023-09-30 10:31:56 +00:00
stephan
ebce46f02f
More work towards the new pointer-passing mechanism in JNI, and code-adjacent cleanups.
...
FossilOrigin-Name: 6c63987e893357dc8b10decaa96c30fb37b75481640a303e77a0d8224354491e
2023-09-30 09:41:58 +00:00
drh
5736ba5ac3
Update json_each() and json_tree() so that they work with JSONB inputs.
...
FossilOrigin-Name: bb5e50ff56dff95d954aacdd4c5461790f953cef8d7b89da000d8d587fcdf9b8
2023-09-29 22:37:18 +00:00
drh
ee50aad865
The u.zJContent field of JsonNode for a string or label should NOT include
...
the quotation mark delimiters. Ever. This is an inefficiency that really
ought to be fixed on trunk, but that can wait until this branch lands.
FossilOrigin-Name: 96f545f6f839dab4829861361ee3d7a56840217c5f954f334616e77d23c5fe29
2023-09-29 19:47:25 +00:00
drh
a99e2fb576
Additional refactoring and cleanup.
...
FossilOrigin-Name: 45dd1760875b1ad899a10189c6f5a0a9a0677903794fb5a06ffacd39952a7882
2023-09-29 16:37:22 +00:00
dan
bee5657042
Add test case to ensure the assert() removed by [f090af77] no longer fails.
...
FossilOrigin-Name: 615ab71761754b072439f92e73fdb98c916b820937bcca8904f4be34936d5f9c
2023-09-29 15:56:40 +00:00
drh
8be48440b6
Remove an incorrect assert().
...
FossilOrigin-Name: f090af775f6d2ce8b50850f5c9e33546bcb9cff5467d99ca210530cb7ca83d5b
2023-09-29 15:53:55 +00:00
drh
ae5f55e227
Improvements to comments and procedure names for clarity in the JSON
...
implementation.
FossilOrigin-Name: 9b620d813ef483f1277c1683c5e926a882f07f3b90804dea0c91b325ff8e45a4
2023-09-29 12:45:14 +00:00
drh
ecce6022d5
Describe the JSONB encoding in a header comment to the json.c source file.
...
FossilOrigin-Name: 1c0cba3461d6111b3aeb77726880221f1240355f0b57e060febbdeb12fb688c0
2023-09-29 11:17:43 +00:00
stephan
83f62816f8
JNI: correct a NullPointerException triggered via SQLTester.
...
FossilOrigin-Name: 0a873de76c0cbcd8e2eda3f0508e427f1dcb32b01798687c0545acfe10102179
2023-09-28 20:34:28 +00:00
drh
8cdab14286
Fix some minor memory issues so that all legacy tests now pass.
...
FossilOrigin-Name: 1744bfc669346ff221f28d45fd978863e876a2d2f0b82bcf0e5ee6f0326900cc
2023-09-28 19:11:36 +00:00
drh
0a19bb078d
Allow the sqlite3_user_data() function to be invoked with a NULL argument
...
or with an sqlite3_context pointer from a virtual table. It returns NULL
in both cases.
FossilOrigin-Name: 2f49687371ada65fef374336c28b352c48ab98dc31282ac82397035efe04ba11
2023-09-28 18:23:52 +00:00
drh
edbc44c5a1
Merge trunk changes into the jsonb branch for the compiler warning fixes
...
from two days ago.
FossilOrigin-Name: cee113cc315b04fd75ccc172cf4529bf15b2050bf274433496c31a282e281ab8
2023-09-28 17:41:45 +00:00