]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Fri, 6 Oct 2023 22:16:09 +0000 (22:16 +0000)]
drh [Fri, 6 Oct 2023 18:21:47 +0000 (18:21 +0000)]
Incremental improvements to the JSONB logic.
FossilOrigin-Name:
fe326829c27715e249f727ba797c7df6491e874ec205a0a82ee09c78d61c6e1f
drh [Fri, 6 Oct 2023 15:35:42 +0000 (15:35 +0000)]
Fixes to rendering JSON5 extensions encoded as JSONB.
FossilOrigin-Name:
5a17e4479aad2d8313170e5de83a1c52f30b55d9d4fb776024fa6622e175c63b
drh [Fri, 6 Oct 2023 14:59:40 +0000 (14:59 +0000)]
drh [Fri, 6 Oct 2023 14:52:49 +0000 (14:52 +0000)]
drh [Fri, 6 Oct 2023 13:05:42 +0000 (13:05 +0000)]
Merge compiler warning fixes from trunk into the jsonb branch.
FossilOrigin-Name:
6409d307915f8969f12df2d5ffa961645bd4db7ccfbd6f52237a217b6a867252
drh [Fri, 6 Oct 2023 12:55:53 +0000 (12:55 +0000)]
Remove an unused parameter from the recomputeColumnsNotIndexed() routine in
order to squash a harmless compiler warning.
FossilOrigin-Name:
9bf4bfd68080367b58594e0d44b110b3ee9766420f648537fd7bc638dacefb72
drh [Fri, 6 Oct 2023 12:51:05 +0000 (12:51 +0000)]
Ensure that all fields of static sqlite3_module objects are explicitly
initialized, in order to hush-up nuisance compiler warnings.
FossilOrigin-Name:
f3b3d712d6e58b1cb8fdebd2b6b3125080b6b3ac8c7c849a8cc1e5e778d62fe7
drh [Fri, 6 Oct 2023 12:22:14 +0000 (12:22 +0000)]
Remove and unused static variable from shell.c.in in order to silence a
harmless compiler warning.
FossilOrigin-Name:
477577120b897bf15edc2a85e220d5c64a1d5a245354939269f6753d8140ac95
drh [Fri, 6 Oct 2023 12:15:01 +0000 (12:15 +0000)]
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
drh [Fri, 6 Oct 2023 00:06:26 +0000 (00:06 +0000)]
Improvements to coping with malformed JSONB.
FossilOrigin-Name:
563cde404cec4c6559ae0c5fc5edbc878fee874b36562ce2fac5049cc8349343
drh [Thu, 5 Oct 2023 23:05:35 +0000 (23:05 +0000)]
Better error detection when doing a lookup on a JSONB.
FossilOrigin-Name:
6e8e0eedbf06e175af6ef230f1ce9a5ad84698b1c6dcd2794d878c746e7b6be4
drh [Thu, 5 Oct 2023 22:52:43 +0000 (22:52 +0000)]
Improvements to comments. No changes to code.
FossilOrigin-Name:
ac74d7877685006e43684edd6a2d22be8c9857f9f9eb52fc5b3c182d5e2fdb8d
drh [Thu, 5 Oct 2023 20:17:01 +0000 (20:17 +0000)]
Turn an unreachable branch into an assert().
FossilOrigin-Name:
0f75199160e48fa8c44f986f1af777adf19e40fbd114a6f58e24d5e6dede779d
drh [Thu, 5 Oct 2023 18:33:19 +0000 (18:33 +0000)]
Fix the parsing of non-standard "Infinity" and "NaN" values from text into
JSONB.
FossilOrigin-Name:
df1fbbeb83a2b4a496c9de0d86c7c8c677f8fe3bc770da163dcc1d338a17b58b
drh [Thu, 5 Oct 2023 18:09:12 +0000 (18:09 +0000)]
Change the json_valid(X) routine to return true whenever X is a blob that
could plausibly be a valid JSONB.
FossilOrigin-Name:
425f0b85a6f8ad0604c4a5faa18efb90436fedb1fe2612a559147c62cff8b7e7
drh [Thu, 5 Oct 2023 17:52:39 +0000 (17:52 +0000)]
Fix the text-to-JSONB parser so that it handles some JSON5 floating point
literals correctly.
FossilOrigin-Name:
564edb3b6dd752e09e445e3a25c2f5394ceede2a2cdff251d6433dadc0b3644f
drh [Thu, 5 Oct 2023 16:33:00 +0000 (16:33 +0000)]
Slightly stricter testing for when a BLOB is valid JSONB: If the element
is a null, true, or false, its payload size must be zero.
FossilOrigin-Name:
487781be8a93d9b8d870efb9f25822bb4bbcf9d39d571d1017e9c29043ea515d
drh [Thu, 5 Oct 2023 15:05:33 +0000 (15:05 +0000)]
Fix a memory leak following a syntax error in jsonb().
FossilOrigin-Name:
bf4b36eda8e200b67041ebdf60fc31d0325bd84185272f8d390c56a91d6ac1ee
drh [Thu, 5 Oct 2023 15:02:00 +0000 (15:02 +0000)]
Allow the PG-style syntax for the PATH operand on the right-hand side of
the ->> and -> operators.
FossilOrigin-Name:
bae5071b0834aa3b7fd4bd871f863e1b148c6558989c8f6cdd02dc4da4770953
drh [Thu, 5 Oct 2023 11:22:16 +0000 (11:22 +0000)]
Merge trunk enhancements into the jsonb branch.
FossilOrigin-Name:
be5907b648386e05530d1e321e2a3e563e07e99f08373aaf9a3452adc9228dc3
drh [Thu, 5 Oct 2023 11:06:10 +0000 (11:06 +0000)]
stephan [Thu, 5 Oct 2023 11:04:49 +0000 (11:04 +0000)]
Do not squelch exceptions from SAHPool VFS importDb() - rethrow them. Problem reported in [forum:
c80fc578809b80a3 |forum post
c80fc578809b80a3 ].
FossilOrigin-Name:
325bcdea4a436e514d83095d3893caf07a714b718e1b643507179b101c108e3b
drh [Thu, 5 Oct 2023 10:35:51 +0000 (10:35 +0000)]
Remove a stray blank line from the beginning of btree.c. No functional
code changes.
FossilOrigin-Name:
c89983dcfc208faa86b31717144c069572598e9770228264d69a044a84bde277
drh [Wed, 4 Oct 2023 12:49:08 +0000 (12:49 +0000)]
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
drh [Wed, 4 Oct 2023 11:52:44 +0000 (11:52 +0000)]
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
drh [Tue, 3 Oct 2023 22:40:22 +0000 (22:40 +0000)]
Fix a memory leak in JSON group-aggregates when the output is JSONB.
FossilOrigin-Name:
08e7db138b636890cb29a76d65c2069c6e2ff44470fa4bca14f4526fe5f195ae
drh [Tue, 3 Oct 2023 21:54:09 +0000 (21:54 +0000)]
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
drh [Tue, 3 Oct 2023 20:58:39 +0000 (20:58 +0000)]
Fix problems in the "json" output column of the json_tree() virtual table
for the case when the input is JSONB.
FossilOrigin-Name:
fefa4475c496aab32fe7b9cc203747ce4faf7448da4f29b807e5486c7686238d
drh [Tue, 3 Oct 2023 19:37:19 +0000 (19:37 +0000)]
Improved handling of OOM while translating the JsonNode representing into
the BLOB representation.
FossilOrigin-Name:
ef5956710bb542d6045c82937d02218a7ed45af94cf3959b0c180268e04d14e1
drh [Tue, 3 Oct 2023 11:36:47 +0000 (11:36 +0000)]
Merge the latest trunk enhancements into the jsonb branch.
FossilOrigin-Name:
e6406a9865b75dea2f26d3ee4f4c206958400059c7f92ced88edc8507dd3c82f
drh [Tue, 3 Oct 2023 10:59:01 +0000 (10:59 +0000)]
Fix a problem in the JSONB parser that comes up following an OOM.
FossilOrigin-Name:
355acfb18897254f6b6444a21d781b5e10e930b81952850dd2a40d88bbf2f3db
drh [Tue, 3 Oct 2023 10:43:30 +0000 (10:43 +0000)]
Fix an issue with the use of jsonb_group_array() and jsonb_group_object()
when used by window functions.
FossilOrigin-Name:
808bd349ba587fbcdc4aea3f9c08e0df01ba08dec181c5af5ea157e89d86ff7b
drh [Mon, 2 Oct 2023 23:56:46 +0000 (23:56 +0000)]
drh [Mon, 2 Oct 2023 20:16:06 +0000 (20:16 +0000)]
Fix jsonb_insert() so that it does not behave like jsonb_set().
New test cases added.
FossilOrigin-Name:
54197149b811d30b6c4487eedf5692b164ed0f90cfcc541aa3157094f5f17f6a
stephan [Mon, 2 Oct 2023 17:12:16 +0000 (17:12 +0000)]
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
drh [Mon, 2 Oct 2023 17:06:28 +0000 (17:06 +0000)]
Fix the length of the string in the new concat() and concat_ws() functions.
FossilOrigin-Name:
325243226520376f4a142864ae3fb98866f25bff4dc50a6b648ef98428a7169f
drh [Mon, 2 Oct 2023 15:56:37 +0000 (15:56 +0000)]
Remove an ALWAYS() from a branch that can in fact be false following an OOM
fault.
FossilOrigin-Name:
3a1feb1c469d3dd50e2558581199b16bfd59b9d5bcb0de5f1a8f0ec30a17b4d1
drh [Mon, 2 Oct 2023 14:51:28 +0000 (14:51 +0000)]
stephan [Mon, 2 Oct 2023 14:44:28 +0000 (14:44 +0000)]
Pointer-casting-related fixes for JNI on 32-bit ARM (pi4 armv7l).
FossilOrigin-Name:
54441039ae3ebe39e42f008f77ce1be117cbda6daeed8b01739ad42a3c1f0754
drh [Mon, 2 Oct 2023 13:35:06 +0000 (13:35 +0000)]
Allow json_replace() to accept JSONB arguments as the new value.
FossilOrigin-Name:
95eb7b37fab29931924311f541d52173ef77a448efc8771b1a1783ccd786d23d
drh [Mon, 2 Oct 2023 13:20:43 +0000 (13:20 +0000)]
Improvements to error handling for BLOB inputs on JSON.
FossilOrigin-Name:
14f20ecbfab44934e86f1ac7a3f745b989aa8190c6df119ff5aa8100fa248d93
drh [Mon, 2 Oct 2023 12:40:04 +0000 (12:40 +0000)]
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
drh [Sun, 1 Oct 2023 18:59:34 +0000 (18:59 +0000)]
Fix problems following OOM in JSONB parsing.
FossilOrigin-Name:
0d8cd6b5fb592f88f593ceaad9cdfa95dcfdf14169c3a56a5becbd66d62fd02b
stephan [Sun, 1 Oct 2023 12:15:38 +0000 (12:15 +0000)]
Add JNI binding for sqlite3_normalized_sql().
FossilOrigin-Name:
2532e5662a2bbb3e6b4c4be3fad035734b684bdf59b178cb64b444ca6d8b956b
stephan [Sun, 1 Oct 2023 11:53:40 +0000 (11:53 +0000)]
Make JNI binding of sqlite3_value_frombind() return boolean instead of int and add tests for it.
FossilOrigin-Name:
906e2ed3e9647f5c2355e9fea2beee141767cae7016da9fa1fe88283726b9369
stephan [Sat, 30 Sep 2023 17:08:29 +0000 (17:08 +0000)]
Fix JNI binding to compile without SQLITE_ENABLE_PREUPDATE_HOOK. Add build option to disable all optional ENABLE flags.
FossilOrigin-Name:
c04022b7407f77eaf0175e831ebcd6bbdc0af1cef0d42c5c11102aa8484f24ca
drh [Sat, 30 Sep 2023 16:50:17 +0000 (16:50 +0000)]
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
stephan [Sat, 30 Sep 2023 16:19:57 +0000 (16:19 +0000)]
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
stephan [Sat, 30 Sep 2023 14:48:21 +0000 (14:48 +0000)]
JNI: rename sqlite3_errmsg16() to sqlite3_errmsg(), as the 16 suffix is superfluous there.
FossilOrigin-Name:
df25b21689de84b7b8c940df39461d3d88f592f0ba2dddcfcbb0bebcea6ee7da
stephan [Sat, 30 Sep 2023 14:34:55 +0000 (14:34 +0000)]
drh [Sat, 30 Sep 2023 14:34:39 +0000 (14:34 +0000)]
Finish adding jsonb_ versions for all JSON routines that return JSON text.
FossilOrigin-Name:
6daa7b69695e1b68dba317abbcad4d0205c91963d4a9eb2d595a3ec10fa0fdf4
stephan [Sat, 30 Sep 2023 13:13:23 +0000 (13:13 +0000)]
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
stephan [Sat, 30 Sep 2023 10:59:18 +0000 (10:59 +0000)]
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
stephan [Sat, 30 Sep 2023 10:37:36 +0000 (10:37 +0000)]
Merge in and close jni-ptr-passing branch. The remaining pointer-passing adaptation can be done incrementally without affecting the interface.
FossilOrigin-Name:
7927c42410ba0d5fc8e6e08caaa5cbaaeb359869f17d1afaa082f1aa47fdb2fc
stephan [Sat, 30 Sep 2023 10:31:56 +0000 (10:31 +0000)]
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
stephan [Sat, 30 Sep 2023 09:41:58 +0000 (09:41 +0000)]
More work towards the new pointer-passing mechanism in JNI, and code-adjacent cleanups.
FossilOrigin-Name:
6c63987e893357dc8b10decaa96c30fb37b75481640a303e77a0d8224354491e
drh [Fri, 29 Sep 2023 22:37:18 +0000 (22:37 +0000)]
Update json_each() and json_tree() so that they work with JSONB inputs.
FossilOrigin-Name:
bb5e50ff56dff95d954aacdd4c5461790f953cef8d7b89da000d8d587fcdf9b8
drh [Fri, 29 Sep 2023 19:47:25 +0000 (19:47 +0000)]
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
drh [Fri, 29 Sep 2023 16:37:22 +0000 (16:37 +0000)]
dan [Fri, 29 Sep 2023 15:56:40 +0000 (15:56 +0000)]
Add test case to ensure the assert() removed by [
f090af77 ] no longer fails.
FossilOrigin-Name:
615ab71761754b072439f92e73fdb98c916b820937bcca8904f4be34936d5f9c
drh [Fri, 29 Sep 2023 15:53:55 +0000 (15:53 +0000)]
drh [Fri, 29 Sep 2023 12:45:14 +0000 (12:45 +0000)]
Improvements to comments and procedure names for clarity in the JSON
implementation.
FossilOrigin-Name:
9b620d813ef483f1277c1683c5e926a882f07f3b90804dea0c91b325ff8e45a4
drh [Fri, 29 Sep 2023 11:17:43 +0000 (11:17 +0000)]
Describe the JSONB encoding in a header comment to the json.c source file.
FossilOrigin-Name:
1c0cba3461d6111b3aeb77726880221f1240355f0b57e060febbdeb12fb688c0
stephan [Thu, 28 Sep 2023 20:34:28 +0000 (20:34 +0000)]
JNI: correct a NullPointerException triggered via SQLTester.
FossilOrigin-Name:
0a873de76c0cbcd8e2eda3f0508e427f1dcb32b01798687c0545acfe10102179
drh [Thu, 28 Sep 2023 19:11:36 +0000 (19:11 +0000)]
Fix some minor memory issues so that all legacy tests now pass.
FossilOrigin-Name:
1744bfc669346ff221f28d45fd978863e876a2d2f0b82bcf0e5ee6f0326900cc
drh [Thu, 28 Sep 2023 18:23:52 +0000 (18:23 +0000)]
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
drh [Thu, 28 Sep 2023 17:41:45 +0000 (17:41 +0000)]
Merge trunk changes into the jsonb branch for the compiler warning fixes
from two days ago.
FossilOrigin-Name:
cee113cc315b04fd75ccc172cf4529bf15b2050bf274433496c31a282e281ab8
drh [Thu, 28 Sep 2023 17:27:24 +0000 (17:27 +0000)]
The json_extract() function now works on BLOBs without the need to translate
into an array of JsonNode objects. This is much faster.
FossilOrigin-Name:
5853065b7ee326c04ddfcde64c178f487af04cd3adc3cc99f559907484ec169d
drh [Thu, 28 Sep 2023 17:23:46 +0000 (17:23 +0000)]
Extract directly from BLOB is now complete and appears to work.
FossilOrigin-Name:
3de58ec99444b16dfcda1e226420e2343450b77abd3faf33a88b6d18339ef17c
drh [Thu, 28 Sep 2023 17:07:43 +0000 (17:07 +0000)]
drh [Thu, 28 Sep 2023 15:56:35 +0000 (15:56 +0000)]
Improvements to json_extract() to better support JSONB. Still not 100% working.
FossilOrigin-Name:
8c82576176539c4d132b14d46adbf31366c4bcaa59a61dd639dc9cc308fe8825
larrybr [Thu, 28 Sep 2023 15:00:25 +0000 (15:00 +0000)]
Clarify serialization API doc w.r.t. buffer validity and usage, instigated by [forum:/forumpost/
8922e2ad2ad41205 |forum post
8922e2ad2ad41205 ]. No code changes.
FossilOrigin-Name:
b488b9fb71652eca90d2bf73d32f3d748badf517859dc833c58e021b0e017194
stephan [Thu, 28 Sep 2023 11:19:37 +0000 (11:19 +0000)]
Adapted the JNI bindings for the sqlite3_value_...() and (pre)update hook APIs to the new pointer-passing mechanism.
FossilOrigin-Name:
4182f0275d5d65e04a130eeef4d44642a5ffeeb4b84430d240ea2605345f1404
stephan [Thu, 28 Sep 2023 10:50:26 +0000 (10:50 +0000)]
Convert the remaining macro-generated JNI bindings to the new pointer-passing mechanism.
FossilOrigin-Name:
250fd6ae806cf705c0f29ad30ad8fb885b12590848e7adae63bc21d874c6d3bd
stephan [Thu, 28 Sep 2023 10:27:01 +0000 (10:27 +0000)]
Convert the macro-generated JNI bindings which take a db pointer to the new pointer-passing mechanism.
FossilOrigin-Name:
5f47fb77db4ee77afc541e680559ad88e66ba7fd04b830e70f8be92cf8d0a60c
drh [Thu, 28 Sep 2023 10:20:56 +0000 (10:20 +0000)]
Work toward getting json_extract() to operate directly on the BLOB, omitting
the translation into a JsonNode array.
FossilOrigin-Name:
c1feba70f55a8e5f4696d48e4706855415d173ac8ac3c2656787c242a883b4f5
drh [Wed, 27 Sep 2023 16:55:13 +0000 (16:55 +0000)]
stephan [Wed, 27 Sep 2023 14:41:49 +0000 (14:41 +0000)]
Adapted JNI sqlite3_blob_...() and sqlite3_close...() to the new pointer-passing mechanism.
FossilOrigin-Name:
0b22c8ef93e5ccd45316099fb8575e27620158b1992c0c70fe0348cfc10147f8
stephan [Wed, 27 Sep 2023 11:01:32 +0000 (11:01 +0000)]
Adapt JNI sqlite3_bind_...() bindings to the new pointer-passing method and correct the mapping of sqlite3_bind_zeroblob64() to use zeroblob64() instead of zeroblob(). Related internal API renaming.
FossilOrigin-Name:
980d559fff6e55d1e2ef39f242a8a09313a936cfb141807db475bcceff924869
stephan [Wed, 27 Sep 2023 10:29:07 +0000 (10:29 +0000)]
Add missing license headers to JNI annotation classes and extend the definition of @NotNull to include 0L as the equivalent of null to account for the current rework of how pointers are passed from Java to C.
FossilOrigin-Name:
bccdfeb9efde20410bde545893fb98ce5c0c4d04a8e7797b868ba8994120e1db
stephan [Wed, 27 Sep 2023 09:58:36 +0000 (09:58 +0000)]
Rework the JNI sqlite3_backup APIs to the new pointer-passing approach.
FossilOrigin-Name:
48aeb1e2cdeb4aec85c4f63a1f809215cd4b473791169e72b5ddf6d6bdc2f7b7
stephan [Tue, 26 Sep 2023 21:37:52 +0000 (21:37 +0000)]
Start reworking JNI methods such that they pass void pointers from Java to C instead of passing their strongly-typed wrappers, as that is reportedly significantly faster than passing the wrapper objects to C and extracting the pointers there. There are still many, many functions left to rework for this.
FossilOrigin-Name:
66c814dd473731703ee00e1ff610acfdccf09d1b87dd2355795ed697d4ed5d3e
drh [Tue, 26 Sep 2023 21:22:46 +0000 (21:22 +0000)]
Fix harmless compiler warnings in the testfixture testing utility.
FossilOrigin-Name:
5a39a02d2dfd9ed6171cd0bd434b2bc268d0ed8ead6e1a396d1603266d9493ef
stephan [Tue, 26 Sep 2023 19:49:35 +0000 (19:49 +0000)]
JNI: implement AutoCloseable for the sqlite3 and sqlite3_stmt classes, and adjust a few tests to use it. Override Object.finalize() for sqlite3 class but not sqlite3_stmt (where it triggers a JVM crash for as-yet-unknown reasons).
FossilOrigin-Name:
b633d8bbdbd43464ee03058c273e5188117b9538ed5d5148a1a3851e4adf6410
drh [Tue, 26 Sep 2023 19:46:38 +0000 (19:46 +0000)]
Merge partial-index constant value fixes from trunk into the jsonb branch.
FossilOrigin-Name:
700bdbd7383f66a0da675c197204da4e7b6ed757155145ee98d572de32a5d0ae
drh [Tue, 26 Sep 2023 19:38:24 +0000 (19:38 +0000)]
Fix yet another assert() in the partial-index constant value optimization.
FossilOrigin-Name:
f459d0806cf044fd07743e4c91d0a5a6ddf45b3b41004bde4278f190d99a4cf5
drh [Tue, 26 Sep 2023 19:30:46 +0000 (19:30 +0000)]
Add in many jsonb_xxxx() interfaces. Still uses the internal JsonNode
representation for transformations and search, but it does at least conform
to the desired API design. Largely untested.
FossilOrigin-Name:
e6045b4e1bf3a8e33926fc12b3c039f5e1002eaecbe277ffa82b0ec271a29d17
dan [Tue, 26 Sep 2023 19:26:47 +0000 (19:26 +0000)]
Remove a NEVER() from a condition in the partial-index constant value optimization that can sometimes be true.
FossilOrigin-Name:
63aea8c3e0605edcf49ad1e5ce1a56d2690dcb8c4857043997545daab46ca035
drh [Tue, 26 Sep 2023 15:13:04 +0000 (15:13 +0000)]
Merge all the latest trunk enhancements into jsonb branch.
FossilOrigin-Name:
ac242c4d47ec36aab1c2fa5e65e7b595e686f49473b75bd63708d05c59ce3f0f
drh [Tue, 26 Sep 2023 14:57:30 +0000 (14:57 +0000)]
Remove unreachable code from the partial-index constant value optimization
([
8d4160910d651246 ]).
FossilOrigin-Name:
7ad38254c37153efa72291d09800693ca60894359548eda877d59defa8c70d49
stephan [Tue, 26 Sep 2023 09:46:04 +0000 (09:46 +0000)]
stephan [Tue, 26 Sep 2023 07:43:51 +0000 (07:43 +0000)]
dan [Mon, 25 Sep 2023 17:46:02 +0000 (17:46 +0000)]
In partial index scans, if the WHERE clause implies a constant value for a table column, replace occurences of that table column with the constant. This increases the likelihood of the partial index being a covering index.
FossilOrigin-Name:
8d4160910d6512469cb0a060b89c2509dde1c8e33d9358034d7fb39cd494eabe
dan [Mon, 25 Sep 2023 17:21:53 +0000 (17:21 +0000)]
Another very minor tweak to code on this branch to save cycles.
FossilOrigin-Name:
2c805dc68112db7f06aea56a731a33e046e876851bdda3e725ba96f6da1bf2ee
drh [Mon, 25 Sep 2023 17:14:17 +0000 (17:14 +0000)]
When parsing JSON text into the BLOB format, only use node type JSONB_TEXTJ
for an unquoted object label if the object label contains escape sequences.
FossilOrigin-Name:
a82ebbac3c542ec7f86d1e8414d7fd166db48450115ee3b26d12b5bb445f5896
dan [Mon, 25 Sep 2023 15:25:49 +0000 (15:25 +0000)]
Change the order of an if..else... in new code to make it slightly faster.
FossilOrigin-Name:
f80dc64483a54a488e507da140836261ae1b864577cc95d8e869919d5a25e73c
drh [Mon, 25 Sep 2023 14:20:07 +0000 (14:20 +0000)]
Enable -Wall for the compiler on --enable-debug builds.
FossilOrigin-Name:
63a7b521390001939909d43d908af78f7df7cb92272d2b74f038da918c2bef05
drh [Mon, 25 Sep 2023 13:23:29 +0000 (13:23 +0000)]
As a temporary measure, try to translate the BLOB JSON format into the
legacy node format for processing.
FossilOrigin-Name:
14f2e95a9e531ef0d3fa7f1249f23c073a50c31b2109eefc2f258cada635ac2f
dan [Mon, 25 Sep 2023 11:12:39 +0000 (11:12 +0000)]
Fix a bad interaction between LEFT JOIN, bloom filters and partial indexes.
FossilOrigin-Name:
5775f92b31f0539c66d37e50689bec17a82c0e857a781331c03e34bc18157087