]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
19 months agoFix up the JSON cache to work better. jsonb-cache
drh [Fri, 1 Dec 2023 18:46:14 +0000 (18:46 +0000)] 
Fix up the JSON cache to work better.

FossilOrigin-Name: 1fdbc39521f63aedc6f08ecaafa54ea467b8c6316a692a18ad01eecbf22a0977

19 months agoCache is working better, but does not preserve the hasJson5 flag.
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

19 months agoFirst attempt to get the JSON text-to-binary cache working. All test cases
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

19 months agoRemove all trace of JsonNode from the JSON implementation. The JSONB format
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

19 months agoConvert json_valid() over to using only JSONB as its internal format.
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

19 months agoConvert json_type() to use JSONB internally.
drh [Thu, 30 Nov 2023 19:29:56 +0000 (19:29 +0000)] 
Convert json_type() to use JSONB internally.

FossilOrigin-Name: 83074835b900ce85cf67059e674ce959801505c37592671af25ca0af7ed483f1

19 months agoConvert json_insert(), json_replace(), and json_set() over to using only
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

19 months agoEnhance json_set() and json_insert() so that they create missing jsonb-insert
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

19 months agoSimplification of the new JSON insert/set test cases.
drh [Thu, 30 Nov 2023 16:17:09 +0000 (16:17 +0000)] 
Simplification of the new JSON insert/set test cases.

FossilOrigin-Name: 04c0d5644372446c924a2e31a26edf51ddc563a1990d170b0ed4739e3e8b239b

19 months agoNew test cases for insert/set/replace with paths that indicate substructure
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

19 months agoConvert json_insert(), json_replace(), json_set() to use JSONB internally.
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

19 months agoConvert the json_error_position() routine to use only JSONB internally.
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

19 months agoThe json_patch() function now operates exclusively on JSONB. This patch
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

19 months agoMerge all the latest trunk enhancements into the jsonb branch.
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

19 months agoThe assertion change at check-in [7946c79567b0ccd3] is insufficient to fix
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

19 months agoConvert the json_array_length() function to use JSONB instead of JsonNodes.
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

19 months agoFix all known problems with JSONB json_extract().
drh [Tue, 28 Nov 2023 23:26:55 +0000 (23:26 +0000)] 
Fix all known problems with JSONB json_extract().

FossilOrigin-Name: d5f48c57e975ac468cf29a43a5d0b56ef6d06cf35a8b0bddf87ec1c0fc7ae028

19 months agoDo not set the J subtype when the output is JSONB. jsonb-extract
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

19 months agoPreserve flexibility in the format of the RHS of -> and ->> operators found
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

19 months agoAttempt to get json_extract() working with pure JSONB only, and without
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

19 months agoThe json_remove() function now uses only JSONB, never JsonNodes, internally.
drh [Tue, 28 Nov 2023 18:16:02 +0000 (18:16 +0000)] 
The json_remove() function now uses only JSONB, never JsonNodes, internally.

FossilOrigin-Name: b69786e746ae2b927b64d9871fd120b7f8f06cc53739fd46a4da51aa16cf8576

19 months agoIn SQLITE_ENABLE_SETLK_TIMEOUT builds, use blocking locks in place of sleep() calls...
dan [Tue, 28 Nov 2023 17:12:42 +0000 (17:12 +0000)] 
In SQLITE_ENABLE_SETLK_TIMEOUT builds, use blocking locks in place of sleep() calls when opening a read-transaction.

FossilOrigin-Name: 4c055b7a6e4533e1e571773456226ca7038ce372df3eedbbbcd9a81e8652a6cf

19 months agoHandle an SQLITE_BUSY_TIMEOUT error if one occurs while attempting a shared lock... blocking-dms-lock
dan [Tue, 28 Nov 2023 15:29:04 +0000 (15:29 +0000)] 
Handle an SQLITE_BUSY_TIMEOUT error if one occurs while attempting a shared lock on a read-lock slot.

FossilOrigin-Name: 5fbf3906d272df3eb981f67455eb35f649ad2774cba9fc3f077b28d9bef3f0cb

19 months agoActivate the ability of json_patch() to work on JSONB.
drh [Tue, 28 Nov 2023 13:38:22 +0000 (13:38 +0000)] 
Activate the ability of json_patch() to work on JSONB.

FossilOrigin-Name: 11aba347ff7c639500eec904e212eabe889b077351b946cfeac2b74b9703672a

19 months agoAll legacy tests are passing. jsonb-patch
drh [Tue, 28 Nov 2023 13:35:53 +0000 (13:35 +0000)] 
All legacy tests are passing.

FossilOrigin-Name: 2c436806b8d5f57de99c00f6154b038454fb9ae427d00d7b4a46ab9c7c69bcb9

19 months agoThe json_patch() code for JSONB compiles and works sometimes, but there are
drh [Tue, 28 Nov 2023 12:28:28 +0000 (12:28 +0000)] 
The json_patch() code for JSONB compiles and works sometimes, but there are
still issues.  Incremental check-in.

FossilOrigin-Name: e0099464a0045a04f4ccf29bc2b8325fc8c7f39ccf4847e74818f928c9153588

19 months agoMore aggressive use of jsonBlobEdit(). Improvements to the MergePatch
drh [Tue, 28 Nov 2023 00:27:58 +0000 (00:27 +0000)] 
More aggressive use of jsonBlobEdit().  Improvements to the MergePatch
implementation sketch.

FossilOrigin-Name: fbca9570fd2e1465739e4d3a8d9bb40fad594fd78ab49b2cb34efa27ebdd8361

19 months agoAdd untested (#ifdefed-out) code for the MergePatch algorithm against JSONB.
drh [Mon, 27 Nov 2023 23:46:12 +0000 (23:46 +0000)] 
Add untested (#ifdefed-out) code for the MergePatch algorithm against JSONB.
Add (and test) the jsonBlobEdit() routine that is needed by the new MergePatch.

FossilOrigin-Name: 4d353387fc10e1038cfdd86e66007bf728c231a928e588897bbee0fbfe76f225

19 months agoHave SQLITE_ENABLE_SETLK_TIMEOUT builds block when locking a read-lock slot.
dan [Mon, 27 Nov 2023 20:37:03 +0000 (20:37 +0000)] 
Have SQLITE_ENABLE_SETLK_TIMEOUT builds block when locking a read-lock slot.

FossilOrigin-Name: f797baf47cf7859cfd8ce248f4f3087af4551a7040af990333426e5a7c269504

19 months agoIn SQLITE_ENABLE_SETLK_TIMEOUT builds, use blocking locks in place of sleep() when...
dan [Mon, 27 Nov 2023 19:22:50 +0000 (19:22 +0000)] 
In SQLITE_ENABLE_SETLK_TIMEOUT builds, use blocking locks in place of sleep() when opening a read-transaction.

FossilOrigin-Name: a51ef39998e25e86bd0600e71d15011b12e05f4319608018293bdaecb09e8c97

19 months agoEnhance the (SQLITE_DEBUG-only) json_parse() routine so that it shows a
drh [Mon, 27 Nov 2023 17:13:18 +0000 (17:13 +0000)] 
Enhance the (SQLITE_DEBUG-only) json_parse() routine so that it shows a
decoding of JSONB when given a BLOB argument.

FossilOrigin-Name: af267868562e0799ad691dccad05f17afbc34d609eede8c55f57d209290246ef

19 months agoGive the json_valid() function an optional second argument that determines
drh [Mon, 27 Nov 2023 15:57:11 +0000 (15:57 +0000)] 
Give the json_valid() function an optional second argument that determines
what is meant by "valid".

FossilOrigin-Name: a4e19ad43dac81e7655ec03ff69bb99d1d02b0c227034c90fb41415fd4793fe3

19 months agoConvert the json_tree() and json_each() virtual tables over to use JSONB has
drh [Mon, 27 Nov 2023 12:36:29 +0000 (12:36 +0000)] 
Convert the json_tree() and json_each() virtual tables over to use JSONB has
their internal representation.

FossilOrigin-Name: ec18caa3f7790b780dde66c1ccbb6eb09d2f1507629cc45955fc1b08380b4017

19 months agoAll tests passing. jsonb-tree
drh [Mon, 27 Nov 2023 12:30:55 +0000 (12:30 +0000)] 
All tests passing.

FossilOrigin-Name: b5a5660ca22437640c9bf32c44d92c76a7293dafcbaf4fa6a4c171128d64871d

19 months agoFix corner-case error conditions.
drh [Sun, 26 Nov 2023 00:56:40 +0000 (00:56 +0000)] 
Fix corner-case error conditions.

FossilOrigin-Name: ec23d34ab75e1d7e9366e59c633e0d30def8759f6d4717583ebeb4c90aeccf0d

19 months agoSame results as the legacy JsonNode implementation on a small set of test cases.
drh [Sun, 26 Nov 2023 00:48:37 +0000 (00:48 +0000)] 
Same results as the legacy JsonNode implementation on a small set of test cases.

FossilOrigin-Name: c3da4b079a1a15a4c0b1a6e71f876648b1d9eb32eddc67b9946c2475c7b6d085

19 months agoRemove unused elements from the json_tree() cursor.
drh [Sat, 25 Nov 2023 23:00:50 +0000 (23:00 +0000)] 
Remove unused elements from the json_tree() cursor.

FossilOrigin-Name: 914a50117d477b2cd30d58388fb8d1b71ff7ff6842ba025f38efc6e9647d06d0

19 months agoRemove the vestigal JsonNode logic from json_tree() and json_each().
drh [Sat, 25 Nov 2023 20:59:03 +0000 (20:59 +0000)] 
Remove the vestigal JsonNode logic from json_tree() and json_each().

FossilOrigin-Name: 66c2ab9ebbf90477742e6be0d30e061d827c409de038f2a5b73479ed9448c4a6

19 months agoAlmost working. Path is still not exactly right when Root is defined on
drh [Sat, 25 Nov 2023 19:28:44 +0000 (19:28 +0000)] 
Almost working.  Path is still not exactly right when Root is defined on
json_tree().

FossilOrigin-Name: 92258246916a9c0d72785964513113848a850dec78bdade8b3f274e410df4e7e

19 months agoGenerate the fullkey and path columns of json_tree().
drh [Sat, 25 Nov 2023 18:11:11 +0000 (18:11 +0000)] 
Generate the fullkey and path columns of json_tree().

FossilOrigin-Name: ffaa468ab8871906121df9ee5ef3dc00129a0086ed9c18831ecda69bf7f71455

19 months agoHandle the path argument to json_tree() and json_each().
drh [Sat, 25 Nov 2023 13:40:19 +0000 (13:40 +0000)] 
Handle the path argument to json_tree() and json_each().

FossilOrigin-Name: fded888469565b2a4687185a926bd23fccfbf167c8bebe6c10696fc7f972f41e

19 months agoContinuing work on json_tree() against a JSONB.
drh [Fri, 24 Nov 2023 21:57:38 +0000 (21:57 +0000)] 
Continuing work on json_tree() against a JSONB.

FossilOrigin-Name: 3df891cb11feee65e239ee2506eda34a9688341f05210d7c2e25a05338cb71ad

19 months agoAdd the --buildonly and --dryrun options to testrunner.tcl.
dan [Fri, 24 Nov 2023 20:14:18 +0000 (20:14 +0000)] 
Add the --buildonly and --dryrun options to testrunner.tcl.

FossilOrigin-Name: a0c87ae9d3db914d18e2c8811db0d0ae3ad7b15c63de84fa975efce28bace27e

19 months agoIncremental progress toward getting json_each() and json_tree() to work
drh [Fri, 24 Nov 2023 18:44:00 +0000 (18:44 +0000)] 
Incremental progress toward getting json_each() and json_tree() to work
directly off of a JSONB blob.

FossilOrigin-Name: f8cab41b3bc65af6ff34b481db693d640ea025d09463d50b8e56d855e2abc913

19 months agoAllow a pattern to filter test scripts to be appended to testrunner.tcl "mdevtest...
dan [Fri, 24 Nov 2023 18:33:40 +0000 (18:33 +0000)] 
Allow a pattern to filter test scripts to be appended to testrunner.tcl "mdevtest", "sdevtest" and "release" commands. e.g. "tclsh test/testrunner.tcl sdevtest fts5%".

FossilOrigin-Name: f8ea0b58b37f4052ded448e595d6d2992988a33b8ecfe58d68f20532f8cb5a37

19 months agoGet all CLI print calls which went to stdout in 3.44.0 to continue going to stdout.
larrybr [Fri, 24 Nov 2023 15:58:14 +0000 (15:58 +0000)] 
Get all CLI print calls which went to stdout in 3.44.0 to continue going to stdout.

FossilOrigin-Name: e9951ede184ce07cf725152723d795f299922460715ab76225cd3071bf0f18ee

19 months agoFix jsonParseReset() to properly clear the JsonParse.aBlob element.
drh [Fri, 24 Nov 2023 14:25:56 +0000 (14:25 +0000)] 
Fix jsonParseReset() to properly clear the JsonParse.aBlob element.

FossilOrigin-Name: ab2644aacf4757a51cf62e05cff6711a0a3605d60502a3dd310887df1b993545

19 months agoOmit precompiled binaries from the source tree.
drh [Fri, 24 Nov 2023 14:03:20 +0000 (14:03 +0000)] 
Omit precompiled binaries from the source tree.

FossilOrigin-Name: 7dbc2f496d7a362460bb4c262ecafe5f30e35a8744861163d12c996365c2142f

19 months agoOmit the precompiled binary from the source tree.
drh [Fri, 24 Nov 2023 14:01:56 +0000 (14:01 +0000)] 
Omit the precompiled binary from the source tree.

FossilOrigin-Name: 4ff103d294b79cf7734e87e94e9d88c0e9f0b087cbb352e6da2f0a3a6b268f46

19 months agoMerge the latest trunk enhancements and fixes into the jsonb branch.
drh [Fri, 24 Nov 2023 13:41:20 +0000 (13:41 +0000)] 
Merge the latest trunk enhancements and fixes into the jsonb branch.

FossilOrigin-Name: a838ebcbbd9f554fd84a1d3176fb572faaef7d0ec0675f1a5bf9430865dafae0

19 months agoCLI .output/.once to not redirect ".timer on" results.
larrybr [Fri, 24 Nov 2023 13:26:42 +0000 (13:26 +0000)] 
CLI .output/.once to not redirect ".timer on" results.

FossilOrigin-Name: ce766ed51f772a960d0b7a52c113b55c7ae90ef35050496d8e2a77547eab1a4d

19 months agoFix an fts5 problem that could occur when mixing regular and secure delete operations...
dan [Thu, 23 Nov 2023 11:18:06 +0000 (11:18 +0000)] 
Fix an fts5 problem that could occur when mixing regular and secure delete operations on a single table.

FossilOrigin-Name: 8eb3f40021994f0d25ef9d246873796c84886e5951bb8ab991e1e2df31998484

19 months agoFix output redirect bug reported in [forum:/forumposts/cbf4933cfeee74bb|the forum].
larrybr [Thu, 23 Nov 2023 07:08:49 +0000 (07:08 +0000)] 
Fix output redirect bug reported in [forum:/forumposts/cbf4933cfeee74bb|the forum].

FossilOrigin-Name: ce542fee6f0150bbd13505dcd26b21a9d1d23eb2dc8e78e63f9da6b4298ec028

19 months agoMinor doc fix in src/betreeInt.h, prompted by an email report. No code changes.
stephan [Wed, 22 Nov 2023 22:59:28 +0000 (22:59 +0000)] 
Minor doc fix in src/betreeInt.h, prompted by an email report. No code changes.

FossilOrigin-Name: 30d49aaed20454fe006e2f89db58f0c0b2433c99b2676a0b9583f56b7adb7fdb

19 months agoFor CLI build with unused function warnings on, #ifdef out a console I/O function...
larrybr [Wed, 22 Nov 2023 21:24:50 +0000 (21:24 +0000)] 
For CLI build with unused function warnings on, #ifdef out a console I/O function, fPutbUtf8().

FossilOrigin-Name: da36f90d94b3b55de71aa7965421ea850ac677e9e63d60744633c4dc59448de4

19 months agoCorrect the URL for loading sqlite3-worker1-bundler-friendly.mjs from sqlite3-worker1...
stephan [Wed, 22 Nov 2023 17:11:39 +0000 (17:11 +0000)] 
Correct the URL for loading sqlite3-worker1-bundler-friendly.mjs from sqlite3-worker1-promiser-bundler-friendly.js, so that the promiser can be used in bundler-using environments. Problem reported via email.

FossilOrigin-Name: 753a75218913c3b9c7ec5438387107369c34d1775d68b04d19ae18197e558605

19 months agoInserts invalid JSONB should return "malformed JSON", not a json path error.
drh [Tue, 21 Nov 2023 22:36:32 +0000 (22:36 +0000)] 
Inserts invalid JSONB should return "malformed JSON", not a json path error.

FossilOrigin-Name: 306ee66fbd0231a9f5b229e5630d5cc66c9cf08b466d2d9204e79e1f44a16374

19 months agoDirect editing of JSONB using json_insert() and json_set().
drh [Tue, 21 Nov 2023 20:13:08 +0000 (20:13 +0000)] 
Direct editing of JSONB using json_insert() and json_set().

FossilOrigin-Name: fffb7a9538838e26991e6f16ea3138346a30c33ea6c3d3834680ee6d1f6eece2

19 months agoCorrect blob-to-text rendering in some corner cases.
drh [Tue, 21 Nov 2023 19:05:22 +0000 (19:05 +0000)] 
Correct blob-to-text rendering in some corner cases.

FossilOrigin-Name: 7822e0e59f9b611fe6289cc762b0aff61f9b87c3a82c60de110f447589a2c125

19 months agoMerge console I/O changes for Windows CLI.
larrybr [Tue, 21 Nov 2023 18:26:06 +0000 (18:26 +0000)] 
Merge console I/O changes for Windows CLI.

FossilOrigin-Name: 935a8a8ee76d0014df42c1480e044fd1c2dfc26e78abb587d99d861d2ae5eb27

19 months agoFix the translation of JSON5 numeric values from BLOB into text.
drh [Tue, 21 Nov 2023 18:23:43 +0000 (18:23 +0000)] 
Fix the translation of JSON5 numeric values from BLOB into text.

FossilOrigin-Name: 40c4fb441f220982e4d61fd42597cf18546791a302fbcc8eec2eed29ee15ef35

19 months agoMerge all recent trunk fixes and enhancements into the jsonb branch.
drh [Tue, 21 Nov 2023 17:54:55 +0000 (17:54 +0000)] 
Merge all recent trunk fixes and enhancements into the jsonb branch.

FossilOrigin-Name: 6d78d50ed2357e6c943c1ef97b1d2ea0902cbadef90c2c35dccdbdc2bdf8702f

19 months agoMake edits directly to the JSONB BLOB when the input to json_replace()
drh [Tue, 21 Nov 2023 17:51:58 +0000 (17:51 +0000)] 
Make edits directly to the JSONB BLOB when the input to json_replace()
is a JSONB.

FossilOrigin-Name: d69c6acef54a81f46a97a05d443fe648635b4b70772069d6705ef829b718e985

19 months agoSync w/trunk as pre-merge-to-trunk sanity check.
larrybr [Tue, 21 Nov 2023 15:55:31 +0000 (15:55 +0000)] 
Sync w/trunk as pre-merge-to-trunk sanity check.

FossilOrigin-Name: 448d6a1182d29940d5d34be2ce67df5601b688cd902dbbe97e95073f982a49ce

19 months agoFix the trace3-4.4 test to be more rebust against timing quirks.
drh [Tue, 21 Nov 2023 12:02:04 +0000 (12:02 +0000)] 
Fix the trace3-4.4 test to be more rebust against timing quirks.

FossilOrigin-Name: 8936daa08243729d8538bb7288bbefb43f3bd842a0d4b2e8019092f5701c2926

19 months agoBack out an incorrect change to the sqlite3ExprCompareSkip() function that
drh [Mon, 20 Nov 2023 15:54:00 +0000 (15:54 +0000)] 
Back out an incorrect change to the sqlite3ExprCompareSkip() function that
was added way back on 2019-08-22 for [44578865fa7baf97|check-in 44578865fa7ba]
and which was only today discovered to be incorrect by
[forum:/forumpost/45ec3d9788|forum post 45ec3d9788].

FossilOrigin-Name: f5b3eb0fc8936ba274a7654ff6dfa7d4654bd8dbca7f3a5ec1134b0b5260d59d

19 months agoConvert an assert in OP_VCheck into a branch that aborts the opcode, as this
drh [Mon, 20 Nov 2023 13:06:59 +0000 (13:06 +0000)] 
Convert an assert in OP_VCheck into a branch that aborts the opcode, as this
can happen on some very obscure conditions, as discovered by dbsqlfuzz.
Test case in TH3.

FossilOrigin-Name: 7946c79567b0ccd3a00d12390e99896d7dc11407d0b52bc39338a16a493f56f6

19 months agoFix an assert() in fts5 that could be true following an OOM or IO error in contentles...
dan [Mon, 20 Nov 2023 11:40:18 +0000 (11:40 +0000)] 
Fix an assert() in fts5 that could be true following an OOM or IO error in contentless-delete mode.

FossilOrigin-Name: 3fe89238c31ca163d021ef1fecde594328815aaba7053fef9e9c789562a62f45

19 months agoCherrypick shell1.test fix.
larrybr [Mon, 20 Nov 2023 00:21:24 +0000 (00:21 +0000)] 
Cherrypick shell1.test fix.

FossilOrigin-Name: 91c888eddbcb1b461f7d562c2f0eee57f1a2be7f9959b9d69e80fc7c1da20e9e

19 months agoCherrypick shell1.test fix.
larrybr [Mon, 20 Nov 2023 00:20:56 +0000 (00:20 +0000)] 
Cherrypick shell1.test fix.

FossilOrigin-Name: 39e30c5f9cc6dcac003255734e3ce1ac5b05349ea1a25e1c108b5f6d1d97612b

19 months agoCorrect conditional compilation issue seen with MSVC in the Win32 mutex subsystem.
mistachkin [Sat, 18 Nov 2023 18:36:26 +0000 (18:36 +0000)] 
Correct conditional compilation issue seen with MSVC in the Win32 mutex subsystem.

FossilOrigin-Name: 6f8f4bfe607f1405d313bb88a33490621002f63e8c02c980f4c083630ad3a6d2

19 months agoWhen ENABLE_SETLK is defined, avoid ever blocking on the lock mutex in os_unix.c...
dan [Sat, 18 Nov 2023 17:20:04 +0000 (17:20 +0000)] 
When ENABLE_SETLK is defined, avoid ever blocking on the lock mutex in os_unix.c when requesting an exclusive lock.

FossilOrigin-Name: eb36d475e91bfdbf4a18b6fd9751fbcecf15d960dcd1c00d2d18b5bf1d7503fe

19 months agoAdjust an assert() in fts5WritePoslistData() so that it only applies if there
drh [Sat, 18 Nov 2023 12:06:21 +0000 (12:06 +0000)] 
Adjust an assert() in fts5WritePoslistData() so that it only applies if there
have been no prior errors.
dbsqlfuzz 25dca9b2568f67dc78a0e32ff280133fe71994bd.

FossilOrigin-Name: 257cdbab90c6db8ccc9a8fd5df556b69c3a35a329d39cd4642c792d7359a54a5

19 months agoAnother assertion fault fix, similar to [a9443dbfbe25e588]. dbsqlfuzz
drh [Sat, 18 Nov 2023 11:23:01 +0000 (11:23 +0000)] 
Another assertion fault fix, similar to [a9443dbfbe25e588].  dbsqlfuzz
2d9af4e94aca188e0092900eec711401c5d51687.

FossilOrigin-Name: 3afaeac56dff58db596360bf6f8dca97cb31405f73be8e189e8c0e6a1e5b239d

19 months agoWhen SQLITE_ENABLE_SETLK_TIMEOUT is defined, use a separate mutex in os_unix.c for...
dan [Fri, 17 Nov 2023 19:01:38 +0000 (19:01 +0000)] 
When SQLITE_ENABLE_SETLK_TIMEOUT is defined, use a separate mutex in os_unix.c for each shm locking slot.

FossilOrigin-Name: 64691df980cdf73ddc00aabe15baa6c018e1d76b0e87f55ab33a9348fd5680bd

19 months agoAdd the new "run-fuzzcheck" target on the autoconf unix makefile. Requires
drh [Fri, 17 Nov 2023 17:55:03 +0000 (17:55 +0000)] 
Add the new "run-fuzzcheck" target on the autoconf unix makefile.  Requires
that FUZZDB be set to the name of the fuzz-data database file.

FossilOrigin-Name: 8fa3915dbfdd9a5b0fcf4d695590b3de7e7d19d2917924186ca889cd60bf0eb9

19 months agoAdd an assert() to prove the sqlite3_prepare() always either returns
drh [Fri, 17 Nov 2023 17:25:30 +0000 (17:25 +0000)] 
Add an assert() to prove the sqlite3_prepare() always either returns
SQLITE_OK or else leaves *ppStmt set to NULL.  See
[forum:/forumpost/70bb8576c6c084c2|forum post 70bb8576c6c084c2].

FossilOrigin-Name: feadd4024228e578811447c4b2d2b60780ff3d3681f80ca903585aa7b289d758

19 months agoWhen SQLITE_ENABLE_SETLK_TIMEOUT is defined, use a separate mutex in os_unix.c for... unix-setlk-timeout-mutexes
dan [Fri, 17 Nov 2023 17:10:37 +0000 (17:10 +0000)] 
When SQLITE_ENABLE_SETLK_TIMEOUT is defined, use a separate mutex in os_unix.c for each shm locking slot.

FossilOrigin-Name: 4098df9652d90f2d22d5591d915d672c5413471f7916223510ba6fd932bfdd36

19 months agoMerge the latest trunk enhancements and fixes into the jsonb branch.
drh [Fri, 17 Nov 2023 17:03:45 +0000 (17:03 +0000)] 
Merge the latest trunk enhancements and fixes into the jsonb branch.

FossilOrigin-Name: 162f0509ef27bcd3ec87629640281a71c773e7c3bbd2cd0df76faf481531e7f1

19 months agoFix harmless compiler warnings in debugging code.
drh [Fri, 17 Nov 2023 12:22:42 +0000 (12:22 +0000)] 
Fix harmless compiler warnings in debugging code.

FossilOrigin-Name: ce6a75622ea5bca517bc6613e738aa670c9e1dd863596220eded5c2379c616c7

19 months agoFix an incorrect assert() associated with ALTER TABLE where an unknown
drh [Fri, 17 Nov 2023 11:58:26 +0000 (11:58 +0000)] 
Fix an incorrect assert() associated with ALTER TABLE where an unknown
aggregate function contains an ORDER BY clause.
dbsqlfuzz e0900262dadd5c78c2226ad6a435c7f0255be2cd.

FossilOrigin-Name: a9443dbfbe25e588b4adddde664ddf482f19f71c704fbf356d49cf3a6135e7fb

19 months agoSimplify and make more rational how console I/O package features are selected. (Motiv...
larrybr [Thu, 16 Nov 2023 18:31:05 +0000 (18:31 +0000)] 
Simplify and make more rational how console I/O package features are selected. (Motivated by Fiddle and other command-line utilities to soon use the package.) No substantive code-execution changes.

FossilOrigin-Name: 1cde05877b7e47cb2ab9de26edd5245eb5ff1d91e69b94f3b24944fd4f6ccd3e

19 months agoBoth json_remove() jsonb_remove() work on pure JSONB as long as the input
drh [Wed, 15 Nov 2023 20:32:06 +0000 (20:32 +0000)] 
Both json_remove() jsonb_remove() work on pure JSONB as long as the input
is JSONB.

FossilOrigin-Name: 68d551730be0a3ea9579646ed4836c73554c83ca7f2303b69a18843f1750f1a7

19 months agoSome simple test cases for JSONB direct remove.
drh [Wed, 15 Nov 2023 19:21:09 +0000 (19:21 +0000)] 
Some simple test cases for JSONB direct remove.

FossilOrigin-Name: 8cb4d2cbfc1b5f3c612d85138e66da8735d6589c7538fdf494a761c9b8104f18

19 months agoChanges so that if SQLITE_ENABLE_SETLK_TIMEOUT is defined as 2 instead of 1, all...
dan [Wed, 15 Nov 2023 19:19:04 +0000 (19:19 +0000)] 
Changes so that if SQLITE_ENABLE_SETLK_TIMEOUT is defined as 2 instead of 1, all blocking locks are taken for a single millisecond and the default busy-handler invoked as normal.

FossilOrigin-Name: 79e24ec3dd40373bbb93792829b18d9ef40daf19d4606174e36c8e19e61a7529

19 months agojsonb_remove() now works without having to use a JsonNode parse, assuming
drh [Wed, 15 Nov 2023 18:55:03 +0000 (18:55 +0000)] 
jsonb_remove() now works without having to use a JsonNode parse, assuming
that the input is JSONB.

FossilOrigin-Name: 5207679e929786e577a0553d0d84dda5125456dcde80c0f3156f14f4d8c804cb

19 months agoThe jsonb_remove() routine now appears to be working. jsonb-remove
drh [Wed, 15 Nov 2023 18:47:31 +0000 (18:47 +0000)] 
The jsonb_remove() routine now appears to be working.

FossilOrigin-Name: e76d48137ea823b7810dc8c3b70eb21adabdd6cfbac36050c85d1375e94be1de

19 months agoWork toward getting jsonb_remove() to work directly on JSONB blobs.
drh [Wed, 15 Nov 2023 16:10:31 +0000 (16:10 +0000)] 
Work toward getting jsonb_remove() to work directly on JSONB blobs.

FossilOrigin-Name: a79ff8e58fcaf718a6fb78e145117f1d6d40d133f31e9752bb9c6d484850a27b

19 months agoImprovements to the description of sqlite3_errmsg() and sqlite3_errstr().
drh [Wed, 15 Nov 2023 14:09:37 +0000 (14:09 +0000)] 
Improvements to the description of sqlite3_errmsg() and sqlite3_errstr().

FossilOrigin-Name: fe5cc4169c5348324e863d3e339de94ed01749a3b9c86aa9adc5e3244bd9d033

19 months agoMerge all the latest enhancements and fixes from trunk into the jsonb branch.
drh [Wed, 15 Nov 2023 13:23:40 +0000 (13:23 +0000)] 
Merge all the latest enhancements and fixes from trunk into the jsonb branch.

FossilOrigin-Name: ba91408f4c044feda003ef93784ccefb619f99ab64379ced481ee8e9e890fd41

19 months agoFix an exception misuse in test-opfs-vfs.js.
stephan [Wed, 15 Nov 2023 11:31:49 +0000 (11:31 +0000)] 
Fix an exception misuse in test-opfs-vfs.js.

FossilOrigin-Name: 9264955e6e47aa8fc3a6f8bed192a6c12f43de49f7fba2e0cc080e47abedde14

19 months agoJNI: add more wrapper1 Sqlite.Blob tests.
stephan [Wed, 15 Nov 2023 08:59:53 +0000 (08:59 +0000)] 
JNI: add more wrapper1 Sqlite.Blob tests.

FossilOrigin-Name: d63f6e1ffda9a88a37acc7862cb7ee8b9cd669b0fdba64c1ec9dd221cf807714

19 months agoJNI: clear out the sqlite3_context native pointer after calling UDF callbacks which...
stephan [Wed, 15 Nov 2023 08:29:42 +0000 (08:29 +0000)] 
JNI: clear out the sqlite3_context native pointer after calling UDF callbacks which do not have an argv (as was already done for those which have an argv). Add related tests and code commentary.

FossilOrigin-Name: 138f40543b26b2e02e27d830d92e30b12cfef5a8dc3f0b58b39c68e1b3c91cc6

19 months agoJNI doc updates.
stephan [Wed, 15 Nov 2023 06:28:51 +0000 (06:28 +0000)] 
JNI doc updates.

FossilOrigin-Name: 1b1f36a206319e99ccaed969893ff95dcf3b8e97ed301544cf3cd3fee2780335

19 months agoJNI: add the @Experimental annotation and mark all java.nio.ByteBuffer-related method...
stephan [Wed, 15 Nov 2023 06:10:37 +0000 (06:10 +0000)] 
JNI: add the @Experimental annotation and mark all java.nio.ByteBuffer-related methods with it.

FossilOrigin-Name: 0f4b223102e5dc9142c9d2cb8892b8d3cc476e579420028b93d4e12f4cf94d3e

19 months agoJNI test code cleanups.
stephan [Wed, 15 Nov 2023 05:08:39 +0000 (05:08 +0000)] 
JNI test code cleanups.

FossilOrigin-Name: 09142ac14347e6f41bbe50bc835920e271713452733a478ede547816cc291ace

19 months agoJNI: add CONFIG_LOG and CONFIG_SQLLOG support to wrapper1. Code-adjacent cleanups.
stephan [Wed, 15 Nov 2023 04:55:38 +0000 (04:55 +0000)] 
JNI: add CONFIG_LOG and CONFIG_SQLLOG support to wrapper1. Code-adjacent cleanups.

FossilOrigin-Name: 83c49b9e71e5ae8852bab60a6fa630e22164c8efbf074c85450136781d0fffd3

19 months agoJNI: apply an internal level of API indirection to avoid having to work with massivel...
stephan [Wed, 15 Nov 2023 03:02:11 +0000 (03:02 +0000)] 
JNI: apply an internal level of API indirection to avoid having to work with massively-mangled names for the various sqlite3_config() overloads.

FossilOrigin-Name: 24f20663b1c4e13ff7d9a89e1df6af2e6f5730e5042ae6479e0a8c1bb846f313

19 months agoAdd NEVER() to a branch made unreachable by [6f9eed826f5b3d1c].
drh [Tue, 14 Nov 2023 16:53:52 +0000 (16:53 +0000)] 
Add NEVER() to a branch made unreachable by [6f9eed826f5b3d1c].

FossilOrigin-Name: 26dcaa34e3521783bde687749d590eca54cecb4bb95ef332a4a6473c4141d052

19 months agoJNI: reimplement Tester2.execSql() using the high-level API.
stephan [Tue, 14 Nov 2023 14:59:41 +0000 (14:59 +0000)] 
JNI: reimplement Tester2.execSql() using the high-level API.

FossilOrigin-Name: 3a69679e41d23a760df349b2471a1ed306c087f9a7a7a2e2cba3723071dee6b2