]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
23 months agoDo not cover expressions using an indexed expression if the indexed expression idx-expr-fix
drh [Wed, 8 Nov 2023 18:08:07 +0000 (18:08 +0000)] 
Do not cover expressions using an indexed expression if the indexed expression
is a function that might set a subtype.

FossilOrigin-Name: e908b26a990929996b3c16f0429e8313cd8fcefe7c883c77f66ea69f4059d6e2

2 years agoMore precise characterization of JSON functions. Indicate when functions might
drh [Wed, 8 Nov 2023 16:37:12 +0000 (16:37 +0000)] 
More precise characterization of JSON functions.  Indicate when functions might
return JSON (subtype 'J') and when they make use of the function argument cache.

FossilOrigin-Name: b2b62546c4a5e9dccb8aa0cb8eda228d662c69159e320b01a377317bc909e89f

2 years agoHave the shell tool emit a warning if the user attempts to use ".scanstats vm" in...
dan [Wed, 8 Nov 2023 15:56:41 +0000 (15:56 +0000)] 
Have the shell tool emit a warning if the user attempts to use ".scanstats vm" in a non-SQLITE_ENABLE_BYTECODE_VTAB build.

FossilOrigin-Name: 3978c084a509c3c739fbe87e20feec9ddf1325e35170329987af197ca9fd731a

2 years agoRemove old files related to wapptest.tcl from test/ directory.
dan [Wed, 8 Nov 2023 15:51:42 +0000 (15:51 +0000)] 
Remove old files related to wapptest.tcl from test/ directory.

FossilOrigin-Name: dd3e7b5bcad122ac1e7e19ec547f4486ce90a6a2aa89a64e36bea13a216492fe

2 years agoAvoid blocking as part of passive checkpoint operations, even if SQLITE_ENABLE_SETLK_...
dan [Wed, 8 Nov 2023 15:49:57 +0000 (15:49 +0000)] 
Avoid blocking as part of passive checkpoint operations, even if SQLITE_ENABLE_SETLK_TIMEOUT is defined.

FossilOrigin-Name: e5ecc404cae1ce8b639d0263fa07571c066f11bfc62f5ba331ad7ae138e78572

2 years agoRemove an unused/invalid test from the wasm suite.
stephan [Wed, 8 Nov 2023 15:34:03 +0000 (15:34 +0000)] 
Remove an unused/invalid test from the wasm suite.

FossilOrigin-Name: 916ae898743a969295a48ae2a6e9e366586834b32d77d3fa281bbaf7f2818502

2 years agoJNI build fixes for platforms where the jint type is not the same as int, as reported...
stephan [Wed, 8 Nov 2023 12:56:23 +0000 (12:56 +0000)] 
JNI build fixes for platforms where the jint type is not the same as int, as reported in [forum:9089d2049a|forum post 9089d2049a].

FossilOrigin-Name: b32b0873274bfe472114da8a308a04bee76ba26a5830d8d04fc921f9c1544f9d

2 years agoSuppress harmless UBSAN warnings about memory overflow in OP_AddImm. The
drh [Wed, 8 Nov 2023 00:45:14 +0000 (00:45 +0000)] 
Suppress harmless UBSAN warnings about memory overflow in OP_AddImm.  The
exact same machine code is generated by GCC.

FossilOrigin-Name: b0594383b9fa021a8713d640a4606b9053f8e21d64b4ec8ea60a0b6cddfca306

2 years agoChanges a no-op call to freeP4() into an assert().
drh [Wed, 8 Nov 2023 00:12:38 +0000 (00:12 +0000)] 
Changes a no-op call to freeP4() into an assert().

FossilOrigin-Name: 32a7b1bd4d88a6839c2c5061a38b4a28f31b22aa8fa08c743633ff96fc4bf88d

2 years agoAdd -DSQLITE_ENABLE_SETLK_TIMEOUT=1 to a release-test configuration.
dan [Tue, 7 Nov 2023 20:56:29 +0000 (20:56 +0000)] 
Add -DSQLITE_ENABLE_SETLK_TIMEOUT=1 to a release-test configuration.

FossilOrigin-Name: cd3e38fb0f2f7e134bb6cfbe86b6621017344e4361dc6a09ec1367860ba8773b

2 years agoFix an assert() that could fail within calls to sqlite3_snapshot_open() in SQLITE_ENA...
dan [Tue, 7 Nov 2023 20:11:49 +0000 (20:11 +0000)] 
Fix an assert() that could fail within calls to sqlite3_snapshot_open() in SQLITE_ENABLE_SETLK_TIMEOUT builds.

FossilOrigin-Name: 84634bc268e5c80146f3f3b2e13118f239c9a7e4e4e9dfcaccef2b17252ce53b

2 years agoAn attempt to work around compilation errors on MinGW reported in [forum:9089d2049a...
stephan [Tue, 7 Nov 2023 19:39:23 +0000 (19:39 +0000)] 
An attempt to work around compilation errors on MinGW reported in [forum:9089d2049a|forum post 9089d2049a].

FossilOrigin-Name: d5658a3ee4f585cc1e96d84425aad2e1f56b3ae507c9e17b71e030f83f0b70e8

2 years agoUpdate the documentation to the sqlite3_set_auxdata() and sqlite3_get_auxdata()
drh [Tue, 7 Nov 2023 19:03:13 +0000 (19:03 +0000)] 
Update the documentation to the sqlite3_set_auxdata() and sqlite3_get_auxdata()
routines to make it clear that they do not work as one might expect when they
are called during query planning, instead of during query execution.  The JSON
routines misuse those interfaces, so add a special flag to JSON routines that
prevents them from being invoked during query planning.  Fix for the problem
in [forum:/forumpost/a655ee159eca1ea5|forum post a655ee159eca1ea5].

FossilOrigin-Name: 796a23f9ee33da0803844a2f40c1733db894cc4ef7fbaa1fa94af6af2d3b873b

2 years agoJNI: during static init record whether the current JVM supports JNI-level access...
stephan [Tue, 7 Nov 2023 17:15:55 +0000 (17:15 +0000)] 
JNI: during static init record whether the current JVM supports JNI-level access to java.nio.ByteBuffer raw memory, and add sqlite3_jni_supports_nio() to query that.

FossilOrigin-Name: fb8dbb77a4d8efafd6772333824b4ab589828cf155a63ca6a26730314d0a4bd9

2 years agoAdd Sqlite.prepareMulti() to JNI wrapper1, for preparing multiple statements from...
stephan [Tue, 7 Nov 2023 15:56:39 +0000 (15:56 +0000)] 
Add Sqlite.prepareMulti() to JNI wrapper1, for preparing multiple statements from a single input.

FossilOrigin-Name: e4670d68b52233ab376a1725983e148aaf2a2c3658a41f5768e37a0f1f87428a

2 years agoDiverse minor cleanups in the JNI pieces.
stephan [Tue, 7 Nov 2023 13:44:29 +0000 (13:44 +0000)] 
Diverse minor cleanups in the JNI pieces.

FossilOrigin-Name: 35233dd900632b997b5e532170a3b2af0ca7f1dccb8407555b93f2b395b0f7b4

2 years agoFlesh out [7a63b5b65a79] to be able to build JNI with or without SQLITE_ENABLE_COLUMN...
stephan [Tue, 7 Nov 2023 13:22:49 +0000 (13:22 +0000)] 
Flesh out [7a63b5b65a79] to be able to build JNI with or without SQLITE_ENABLE_COLUMN_METADATA.

FossilOrigin-Name: fcee41b3d4d2558299ead28cc17f290b9ff1957a84c3feaa0a24872feeb22901

2 years agoAdd -DSQLITE_ENABLE_COLUMN_METADATA to the JNI build, as per [forum:9205518c0568fdf0...
stephan [Mon, 6 Nov 2023 21:57:15 +0000 (21:57 +0000)] 
Add -DSQLITE_ENABLE_COLUMN_METADATA to the JNI build, as per [forum:9205518c0568fdf0|forum post 9205518c0568fdf0]. Add tests for the functions that flag enables so that the build will fail if that flag is missing.

FossilOrigin-Name: 7a63b5b65a79d15658a160d0878c7371941c67e9b48a7442762c68c60b77288a

2 years agoFix an fts5 problem where a transaction consisting of (a) a DELETE on rowid X, (b...
dan [Mon, 6 Nov 2023 18:40:25 +0000 (18:40 +0000)] 
Fix an fts5 problem where a transaction consisting of (a) a DELETE on rowid X, (b) a prefix query, and (c) an INSERT on rowid X, could corrupt the index.

FossilOrigin-Name: c2058a045b57571b2b5d342adb212fe606717c633a0422755691ae6bf5725d25

2 years agoAdd incremental blob I/O support to JNI wrapper1.
stephan [Sun, 5 Nov 2023 04:20:04 +0000 (04:20 +0000)] 
Add incremental blob I/O support to JNI wrapper1.

FossilOrigin-Name: 7f1c76fe930d69a0274f70fa7b7e68e0db6226b731a065fa57d0936c8400ffb0

2 years agoJNI wrapper1 normalizeSql() now throws UnsupportedOperationException, instead of...
stephan [Sun, 5 Nov 2023 03:37:33 +0000 (03:37 +0000)] 
JNI wrapper1 normalizeSql() now throws UnsupportedOperationException, instead of returning null, if built without SQLITE_ENABLE_NORMALIZE. Remove SQLITE_PREPARE_NORMALIZE from the JNI interface because it's a legacy no-op.

FossilOrigin-Name: d081a126697e214082f3b203f23ea63510080e5c2aac1d8badc9e6e4bfea7c95

2 years agoAdd authorizer support to JNI wrapper1.
stephan [Sun, 5 Nov 2023 01:55:20 +0000 (01:55 +0000)] 
Add authorizer support to  JNI wrapper1.

FossilOrigin-Name: 773f9873865b5277a6a682c4695f216bfe1ec05ed5e5a2a70aaa451934ba2dc0

2 years agoAdd progress-handler support to JNI wrapper1. Correct the return type of the extended...
stephan [Sun, 5 Nov 2023 01:39:29 +0000 (01:39 +0000)] 
Add progress-handler support to JNI wrapper1. Correct the return type of the extended_result_codes() JNI binding and expose it to wrapper1.

FossilOrigin-Name: 6c0acfdce2160d8db261a59677cec571b6abc333481525b1ec975d98e88bec88

2 years agoAdd update-hook support to JNI wrapper1.
stephan [Sun, 5 Nov 2023 01:14:07 +0000 (01:14 +0000)] 
Add update-hook support to JNI wrapper1.

FossilOrigin-Name: 6c584cf27179d16deee84e9699493cf29bebef123fa2a7493aad0324bead1618

2 years agoAdd commit/rollback hook support to JNI wrapper1.
stephan [Sun, 5 Nov 2023 00:48:43 +0000 (00:48 +0000)] 
Add commit/rollback hook support to JNI wrapper1.

FossilOrigin-Name: ff3d44fe42528d96533d22c7807472df89bca18f1def23b018e2f407318143f8

2 years agoAdd busy-handler support to JNI wrapper1.
stephan [Sun, 5 Nov 2023 00:02:47 +0000 (00:02 +0000)] 
Add busy-handler support to JNI wrapper1.

FossilOrigin-Name: dcf579ab2de4a3d3a437cde59b2fd60f1729c0bde31df1865117e6a5ea4bab20

2 years agoBind collation and collation-needed to JNI wrapper1 and correct the callback return...
stephan [Sat, 4 Nov 2023 23:37:11 +0000 (23:37 +0000)] 
Bind collation and collation-needed to JNI wrapper1 and correct the callback return type for collation-needed callbacks in the lower-level JNI binding.

FossilOrigin-Name: 0f673140681685ab390ecd7326a8b80d060b7ab23c31a2cfc28ba76fd5096afe

2 years agoWrap the sqlite3_backup API in the JNI wrapper1 API.
stephan [Sat, 4 Nov 2023 22:47:40 +0000 (22:47 +0000)] 
Wrap the sqlite3_backup API in the JNI wrapper1 API.

FossilOrigin-Name: 3ee6cc29d2111e7ad90860827c0ea808fdf07bc71defdade7e6794ec4a2a3ce2

2 years agoReimplement auto-extensions in Java for use with the JNI wrapper1 API.
stephan [Sat, 4 Nov 2023 21:51:34 +0000 (21:51 +0000)] 
Reimplement auto-extensions in Java for use with the JNI wrapper1 API.

FossilOrigin-Name: 14ed4c64533622e5faf1aaa59c24885885aad43f1c0d4717773e79440e8e1468

2 years agoEnsure that the YYYY-MM-DD input to date and time functions has been normalized
drh [Sat, 4 Nov 2023 21:44:00 +0000 (21:44 +0000)] 
Ensure that the YYYY-MM-DD input to date and time functions has been normalized
prior to returning a result.
[forum:/forumpost/6bb476897e|Forum post 6bb476897e].

FossilOrigin-Name: b692eb8ccb2d0645599ad73a8bdacf5df499114244aadeb38aabc580fc4dc7c5

2 years agoExpose context_db_handle() to the JNI wrapper1 API and clean up some related tests.
stephan [Sat, 4 Nov 2023 16:01:13 +0000 (16:01 +0000)] 
Expose context_db_handle() to the JNI wrapper1 API and clean up some related tests.

FossilOrigin-Name: c23123af7d40dea24a0848dff987fd58a6703ce04165060533544db85983d566

2 years agoRework the JNI wrapper1 variants of status() and db_status() to be more Java-esque.
stephan [Sat, 4 Nov 2023 13:37:42 +0000 (13:37 +0000)] 
Rework the JNI wrapper1 variants of status() and db_status() to be more Java-esque.

FossilOrigin-Name: 40ad3920673561a06edf0b70a50a40be6cd20817fe22b87b63a9ac80cb2c9df8

2 years agoBind the bool-flag sqlite3_db_config() variants to the JNI wrapper1 API.
stephan [Sat, 4 Nov 2023 13:16:49 +0000 (13:16 +0000)] 
Bind the bool-flag sqlite3_db_config() variants to the JNI wrapper1 API.

FossilOrigin-Name: b5cdcb9279d9276f24b67083839f463beecd731f46f2e8bf68fff716df0a3921

2 years agoBind the trace API to the JNI wrapper1 API and add a way to map the native-level...
stephan [Sat, 4 Nov 2023 12:53:00 +0000 (12:53 +0000)] 
Bind the trace API to the JNI wrapper1 API and add a way to map the native-level db/stmt types to their high-level counterparts (required for translating callbacks such as tracers).

FossilOrigin-Name: 702910e0d1cfc897a269b4fb36b255165958edf529ac9553ebc5155e404d4cd3

2 years agoBack out the ALWAYS inserted late yesterday. The fuzzer discovered a
drh [Fri, 3 Nov 2023 18:45:26 +0000 (18:45 +0000)] 
Back out the ALWAYS inserted late yesterday.  The fuzzer discovered a
counter-example.

FossilOrigin-Name: 570635575cc5fbffe910ed992b58393e214117ef3b5370a66f115cd0ee202913

2 years agoFix a case where adjacent tokens are handled incorrectly by the fts5 snippet() function.
dan [Fri, 3 Nov 2023 17:20:20 +0000 (17:20 +0000)] 
Fix a case where adjacent tokens are handled incorrectly by the fts5 snippet() function.

FossilOrigin-Name: 8f5e9c192ff2820d8cfb076ab28f30697d10c22710583d6c7fd7019c4a0ea795

2 years agoWrap more of the stmt API behind the JNI wrapper1 API.
stephan [Fri, 3 Nov 2023 13:00:51 +0000 (13:00 +0000)] 
Wrap more of the stmt API behind the JNI wrapper1 API.

FossilOrigin-Name: 8fea23dc3af023ccf2909f1b4c6f91e7df0ffaac875b15f1fb3e264fba169b6a

2 years agoBind the sqlite3_keyword_...() and sqlite3_compileoption_...() family of functions...
stephan [Fri, 3 Nov 2023 11:53:13 +0000 (11:53 +0000)] 
Bind the sqlite3_keyword_...() and sqlite3_compileoption_...() family of functions to the JNI wrapper1 API.

FossilOrigin-Name: b27242414d6023eac7e62cf6120e1f02b0ddc7b8f0a1e4c48111cfe88d197cbd

2 years agoUpdate the tool/srctree-check.tcl script so that it verifies that autoconf
drh [Fri, 3 Nov 2023 11:41:24 +0000 (11:41 +0000)] 
Update the tool/srctree-check.tcl script so that it verifies that autoconf
has been run following edits to VERSION.

FossilOrigin-Name: 52ab3deba4d26ca0e9a84a6dff254195b4a0e2cc6cf948cf7a66bb11117e7002

2 years agoUpdate the version number to 3.45.0 to begin the next development cycle.
drh [Fri, 3 Nov 2023 10:15:16 +0000 (10:15 +0000)] 
Update the version number to 3.45.0 to begin the next development cycle.

FossilOrigin-Name: 15b618e92a2708cc83256947736de8c494a9985a77e38bd5efc7e51e72cba344

2 years agoMark a branch made always-true by the penultimate check-in with ALWAYS().
drh [Thu, 2 Nov 2023 22:39:11 +0000 (22:39 +0000)] 
Mark a branch made always-true by the penultimate check-in with ALWAYS().

FossilOrigin-Name: 268b5984a4263bee245a9bb47ac927bde56cdf4af8795b851dada5622224076f

2 years agoIn the previous check-in, use a u32 instead of an int, to make it easier to
drh [Thu, 2 Nov 2023 22:11:35 +0000 (22:11 +0000)] 
In the previous check-in, use a u32 instead of an int, to make it easier to
prove that the integer will never overflow.

FossilOrigin-Name: 51002079e0b499e116415189a913a238e95ed9766a8af9d042928f4263861a87

2 years agoFix a spurious "misuse of aggregate function" error that could occur when an aggregat...
dan [Thu, 2 Nov 2023 21:02:53 +0000 (21:02 +0000)] 
Fix a spurious "misuse of aggregate function" error that could occur when an aggregate function was used within the FROM clause of a sub-select of the select that owns the aggregate. e.g. "SELECT (SELECT x FROM (SELECT sum(t1.a) AS x)) FROM t1". [forum:/forumpost/c9970a37ed | Forum post c9970a37ed].

FossilOrigin-Name: 4470f657d2069972d02a00983252dec1f814d90c0d8d0906e320e955111e8c11

2 years agoAdd the "remove_diacritics" option to the fts5 trigram tokenizer.
dan [Thu, 2 Nov 2023 18:22:35 +0000 (18:22 +0000)] 
Add the "remove_diacritics" option to the fts5 trigram tokenizer.

FossilOrigin-Name: 0d50172477064dce3f7c61641d88aa15d8a1edea9872adaffcc1a7a1c9ab0e93

2 years agoFix a problem with amalgamation builds on this branch. fts5-trigram-diacritics
dan [Thu, 2 Nov 2023 18:10:22 +0000 (18:10 +0000)] 
Fix a problem with amalgamation builds on this branch.

FossilOrigin-Name: 8f046c82c9cf51fc349674577c68d3d2499ee37009deacbf937d711d9930fd49

2 years agoMerge latest JNI pieces into trunk.
stephan [Thu, 2 Nov 2023 18:08:49 +0000 (18:08 +0000)] 
Merge latest JNI pieces into trunk.

FossilOrigin-Name: e8c97faec339430fa2d1a7e915050d9b363bdba606a4419397cb099141da254d

2 years agoAdd the "remove_diacritics" option to the fts5 trigram tokenizer.
dan [Thu, 2 Nov 2023 17:31:06 +0000 (17:31 +0000)] 
Add the "remove_diacritics" option to the fts5 trigram tokenizer.

FossilOrigin-Name: 83da80135b6105f47d1de560232449562ae8ac176c8011a6f75589f62bc9b1db

2 years agoOne more tweak to tool/srctree-check.tcl so that a complete build can be
drh [Thu, 2 Nov 2023 13:10:16 +0000 (13:10 +0000)] 
One more tweak to tool/srctree-check.tcl so that a complete build can be
accomplished from a read-only source tree.

FossilOrigin-Name: cba9f0601ca995ac6952aa3a83f7264f6d25aaaa2ea36b19e90cbf591077de72

2 years agoUpdate the srctree-check.tcl script and child script so that they can be run
drh [Thu, 2 Nov 2023 12:05:55 +0000 (12:05 +0000)] 
Update the srctree-check.tcl script and child script so that they can be run
on a read-only source tree and so that if any inconsistencies are found, the
script returns a non-zero exit code and thus halts the build.

FossilOrigin-Name: 58eb5440d75fb13c1a089cb935de6fb94b4322e10e349db8f11f37b9a2fda2fc

2 years agoCLI to compile with older MSVC compiler.
larrybr [Thu, 2 Nov 2023 11:04:37 +0000 (11:04 +0000)] 
CLI to compile with older MSVC compiler.

FossilOrigin-Name: c89f75f8eef449f6869bda423593f7e14080e805f8ed192aff9463460f11b1a9

2 years agoRemove some outdated JNI docs. jni-post-3.44
stephan [Wed, 1 Nov 2023 20:09:02 +0000 (20:09 +0000)] 
Remove some outdated JNI docs.

FossilOrigin-Name: 52aef3d015bad12c4bd9334ec795276a68a0dabdc6fd0ff2a1068f640171eb77

2 years agoUpdate the windows build documentation to provide the exact command used
drh [Wed, 1 Nov 2023 19:35:15 +0000 (19:35 +0000)] 
Update the windows build documentation to provide the exact command used
to build the DLLs that appear on the download page.

FossilOrigin-Name: 3524a8914c62f7987d948e5ef50cfdcb07254489e80e2257f38d0050c4baf450

2 years agoFix testrunner.tcl so that it accepts a relative path as an argument to the --zipvfs...
dan [Wed, 1 Nov 2023 14:33:44 +0000 (14:33 +0000)] 
Fix testrunner.tcl so that it accepts a relative path as an argument to the --zipvfs switch.

FossilOrigin-Name: c1ed7ed02269e5b26142eb307e7889fc636672f101ea7fc192a2445e16a7dd6f

2 years agoVersion 3.44.0 version-3.44.0
drh [Wed, 1 Nov 2023 11:23:50 +0000 (11:23 +0000)] 
Version 3.44.0

FossilOrigin-Name: 17129ba1ff7f0daf37100ee82d507aef7827cf38de1866e2633096ae6ad81301

2 years agoFix harmless compiler warnings in test code.
drh [Tue, 31 Oct 2023 17:40:30 +0000 (17:40 +0000)] 
Fix harmless compiler warnings in test code.

FossilOrigin-Name: d1895dd8f5757a339f619f22b29c8a739398ded673bb9c93f1b8eb8a4b38f510

2 years agoFix a problem with SQLITE_ENABLE_FTS5 builds of the non-amalgamation testfixture...
dan [Tue, 31 Oct 2023 17:39:10 +0000 (17:39 +0000)] 
Fix a problem with SQLITE_ENABLE_FTS5 builds of the non-amalgamation testfixture.exe in Makefile.msc.

FossilOrigin-Name: 544091cc0f5b7395a89226629267c858ec53f18095aadb3e9307ef8ea718176e

2 years agoRemedy CLI non-UTF8 handling detection flaw [forum:/forumpost/fa0e00d36db5fe0a|noted...
larrybr [Mon, 30 Oct 2023 23:20:45 +0000 (23:20 +0000)] 
Remedy CLI non-UTF8 handling detection flaw [forum:/forumpost/fa0e00d36db5fe0a|noted in a forum post].

FossilOrigin-Name: a4c7954b9380dfd3599e521f7fd40b8b556a7d0268198b302146311d20c3b162

2 years agoRemedy CLI non-UTF8 handling detection flaw [forum:/forumpost/fa0e00d36db5fe0a|noted... win-utf8-io-split
larrybr [Mon, 30 Oct 2023 23:04:27 +0000 (23:04 +0000)] 
Remedy CLI non-UTF8 handling detection flaw [forum:/forumpost/fa0e00d36db5fe0a|noted in a forum post].

FossilOrigin-Name: 2666b80d2cf64a14d0482ee1ce0e8b2ff9e0c5bb21cd626470241a73a6555a3a

2 years agoUpdate the autoconf/Makefile.msc so that it aligns with Makefile.msc.
drh [Mon, 30 Oct 2023 20:35:33 +0000 (20:35 +0000)] 
Update the autoconf/Makefile.msc so that it aligns with Makefile.msc.

FossilOrigin-Name: c4f724de279dae1afd10d435ad61ed07c1e4658288457c50e4f9b2f4521bbe12

2 years agoDodge a nuisance warning from MSVC in CLI use of Prepared Statement Scan Status....
larrybr [Mon, 30 Oct 2023 19:50:20 +0000 (19:50 +0000)] 
Dodge a nuisance warning from MSVC in CLI use of Prepared Statement Scan Status. (Yes, C rules are fine.)

FossilOrigin-Name: 166c96d91dcc8c500a084d5703db103176ed5ec7d5f1334050cd66b3f1cd0e4f

2 years agoAdd a cast to i64 for an integer in an sqlite3OsWrite() offset
drh [Mon, 30 Oct 2023 19:03:17 +0000 (19:03 +0000)] 
Add a cast to i64 for an integer in an sqlite3OsWrite() offset
calculation.  The cast is not strictly necessary, but it helps human readers
see that the code is correct.

FossilOrigin-Name: 7564ff1ba2c2fba89106d1aa06cc5379e752f119f22370f2f155f24cc698dec6

2 years agoFix another comment typo. No code changes.
drh [Mon, 30 Oct 2023 18:48:03 +0000 (18:48 +0000)] 
Fix another comment typo.  No code changes.

FossilOrigin-Name: 3203256c0285ef2fea810d59978603bfd7e38151cbc42e1baddf84b57c56f638

2 years agoAdd FTS5 to default Makefile.msc builds. And UNKNOWN_SQL_FUNCTION and STMT_SCANSTATUS...
dan [Mon, 30 Oct 2023 18:17:29 +0000 (18:17 +0000)] 
Add FTS5 to default Makefile.msc builds. And UNKNOWN_SQL_FUNCTION and STMT_SCANSTATUS to default Makefile.msc shell builds.

FossilOrigin-Name: e41fde2fdb999b430561ac6d6ba150666ad1858e99c973f8dcd04a6934991032

2 years agoMake the new sqlite3_get_clientdata() and sqlite3_set_clientdata() interfaces
drh [Mon, 30 Oct 2023 18:09:14 +0000 (18:09 +0000)] 
Make the new sqlite3_get_clientdata() and sqlite3_set_clientdata() interfaces
available to run-time loaded extensions.

FossilOrigin-Name: 8fc9aa0f896a2676b73c41cefbff74c822a7106b56324558862dd0a2a1877eaf

2 years agoFix problems with previous commit on Makefile.msc. Also some win32-specific test... shell-build-changes
dan [Mon, 30 Oct 2023 18:07:18 +0000 (18:07 +0000)] 
Fix problems with previous commit on Makefile.msc. Also some win32-specific test failures in fts5misc.test.

FossilOrigin-Name: 527f2237a6fb5e2ac97afddd7c65c0afa971efc616cb3b738e7245ee0b8d9570

2 years agoFix typo in a comment. No code changes.
drh [Mon, 30 Oct 2023 17:56:27 +0000 (17:56 +0000)] 
Fix typo in a comment.  No code changes.

FossilOrigin-Name: 424ef9550abaab32f745dc955e8996d51836eaed737e24c4b4db811aa118ce5d

2 years agoAdd FTS5 to default Makefile.msc builds. And UNKNOWN_SQL_FUNCTION and STMT_SCANSTATUS...
dan [Mon, 30 Oct 2023 17:13:12 +0000 (17:13 +0000)] 
Add FTS5 to default Makefile.msc builds. And UNKNOWN_SQL_FUNCTION and STMT_SCANSTATUS to default Makefile.msc shell builds.

FossilOrigin-Name: bf99ebba23b6a72a0c02c5542574f409828343e89501cbe2112596ced063c6ab

2 years agoPredicate Windows CLI UTF-8 console I/O on a runtime capability check rather than...
larrybr [Mon, 30 Oct 2023 16:38:05 +0000 (16:38 +0000)] 
Predicate Windows CLI UTF-8 console I/O on a runtime capability check rather than an OS version check.

FossilOrigin-Name: 0058ea6a69103c1442bf5090553ce9bf77e06011a4960df754eb96144ced497d

2 years agoPredicate Windows CLI UTF-8 console I/O on a runtime capability check rather than...
larrybr [Mon, 30 Oct 2023 13:56:50 +0000 (13:56 +0000)] 
Predicate Windows CLI UTF-8 console I/O on a runtime capability check rather than an OS version check.

FossilOrigin-Name: f89d062f8890fffc957a354e966784031d561d0f8f5c174c1ccdcf77e66c32bd

2 years agoWith SQLITE_ENABLE_BLOCK_ATOMIC_WRITE enabled, if a transaction is committing
drh [Mon, 30 Oct 2023 12:09:48 +0000 (12:09 +0000)] 
With SQLITE_ENABLE_BLOCK_ATOMIC_WRITE enabled, if a transaction is committing
and there is a new freelist page at the end of the database file which would
cause the database file size to grow, ensure that page is written and the
file size grows before the block-atomic-write commits.  Fix for the
problem identified by [forum:/forumpost/3bd8d497b2|forum post 3bd8d497b2]

FossilOrigin-Name: c9fdd6805df04f05ef347e5a43506fd37a729c5924abb6e1103e871c4ac2d6dc

2 years agoFor Windows CLI, institute a version check to determine default MBCS or UTF-8 transla...
larrybr [Sun, 29 Oct 2023 20:05:18 +0000 (20:05 +0000)] 
For Windows CLI, institute a version check to determine default MBCS or UTF-8 translation on console I/O. (Default to UTF-8 where known possible.)

FossilOrigin-Name: ddc6ead6453e0f98943bd07aedd90d47bc2e9e9e27b008d493491168bea2b3f1

2 years agoSimplify code slightly. Improve comments on added code and its use.
larrybr [Sun, 29 Oct 2023 19:55:22 +0000 (19:55 +0000)] 
Simplify code slightly. Improve comments on added code and its use.

FossilOrigin-Name: 046c84296627382ee416f64b02b77a937b368e30b32e6b800de5a854810766f6

2 years agoProperly close a handle. Use a putatively effective runtime test for UTF-8 console...
larrybr [Sun, 29 Oct 2023 16:26:12 +0000 (16:26 +0000)] 
Properly close a handle. Use a putatively effective runtime test for UTF-8 console I/O capability. (This makes the version test useful mainly for avoiding a warning that UTF-8 console I/O could not be setup.)

FossilOrigin-Name: dc91eb91725f3db65c73725f1fbcf18a711cafb65b4fea3277aa0905a24df353

2 years agoCondition default UTF-8 console I/O for Windows builds on OS version 10 or more....
larrybr [Sun, 29 Oct 2023 00:24:22 +0000 (00:24 +0000)] 
Condition default UTF-8 console I/O for Windows builds on OS version 10 or more. This is to accomodate an IsValidCodePage() API which may happily report CP_UTF8 as a valid code page when the stock console cannot, in fact, do UTF-8 I/O.

FossilOrigin-Name: 6b9b2a886fd4d239c2e87c3f3809c011f77c0f60e0c279bbe4e1d1b53c609e2d

2 years agoLimit the range of integer unix timestamps in date4.test, since some systems
drh [Sat, 28 Oct 2023 16:19:21 +0000 (16:19 +0000)] 
Limit the range of integer unix timestamps in date4.test, since some systems
(RaspberryPI) cannot deal with timestamp values that exceed pow(2,31).

FossilOrigin-Name: 765290663b28e90a0494997baf023f9610a4ed32f0ff0099bf9fc3d485733fca

2 years agoUpdate documentation for sqlite3_errmsg() to try to make it clear that if
drh [Sat, 28 Oct 2023 11:53:14 +0000 (11:53 +0000)] 
Update documentation for sqlite3_errmsg() to try to make it clear that if
the schema of a database contains table names or similar with invalid UTF,
then the error message generated by SQLite might also contain invalid UTF.
No changes to code.

FossilOrigin-Name: 33ba13c7c4b6f9c5e64ea30c819718f2caea214afca945c9ed7075864f4aaa40

2 years agoSince SQLite considers NaN to be like NULL and NULL sorts before any integer,
drh [Sat, 28 Oct 2023 11:40:33 +0000 (11:40 +0000)] 
Since SQLite considers NaN to be like NULL and NULL sorts before any integer,
make sure the sqlite3IntFloatCompare() routine reports that the integer
argument is larger if the floating-point argument is NaN.

FossilOrigin-Name: de1cf31a34b0f21288e7e30434a06baf25ee579929107c22e65c57236577fc4a

2 years agoMerge trunk into jni-post-3.44 branch.
stephan [Sat, 28 Oct 2023 03:56:14 +0000 (03:56 +0000)] 
Merge trunk into jni-post-3.44 branch.

FossilOrigin-Name: 9670eb2496b4005cf718d9fd12dbd11733f7cf6704a967ebb316504ea6a51e82

2 years agoRemove the SQLITE_MAX_ALLOCATION_SIZE flag (set to 536mb) from the WASM and JNI build...
stephan [Sat, 28 Oct 2023 03:54:28 +0000 (03:54 +0000)] 
Remove the SQLITE_MAX_ALLOCATION_SIZE flag (set to 536mb) from the WASM and JNI builds because it can unduly limit db exports via sqlite3_serialize(), as reported in [forum:75524f7342c1ba45|forum post 75524f7342c1ba45]. It now defaults to whatever sqlite3.c uses, which is currently just shy of 2gb.

FossilOrigin-Name: f6e1137919243c5ce86725df64b40b7e12e82cbceaff210ca41616d620f0dd1b

2 years agoAdd missing docs for the JS Worker1 export method, as pointed out in [forum:75524f734...
stephan [Fri, 27 Oct 2023 23:02:01 +0000 (23:02 +0000)] 
Add missing docs for the JS Worker1 export method, as pointed out in [forum:75524f7342|forum post 75524f7342].

FossilOrigin-Name: a7b267bd11216ee990cdd855044fbc18c300dff07cf25b317f27c1bbbc340dcc

2 years agoFix cosmetic flaw in SQLITE_TXN_* doc. (no code change)
larrybr [Fri, 27 Oct 2023 21:44:53 +0000 (21:44 +0000)] 
Fix cosmetic flaw in SQLITE_TXN_* doc. (no code change)

FossilOrigin-Name: 72d7c18f80f41529811f74855ac198681a0cfe7634225233ec4b8df219c2e73b

2 years agoExport sqlite3_get_autocommit() to WASM and add tests for it.
stephan [Fri, 27 Oct 2023 21:05:50 +0000 (21:05 +0000)] 
Export sqlite3_get_autocommit() to WASM and add tests for it.

FossilOrigin-Name: 7cb6d3cd3926882240c91a4b90fdf237b931653295d8d94b05ed885dcae59608

2 years agoDisable two rtree test cases for Linux-i686. We do not have that platform
drh [Fri, 27 Oct 2023 18:16:15 +0000 (18:16 +0000)] 
Disable two rtree test cases for Linux-i686.  We do not have that platform
available for testing.  The test cases work on all other 64-bit and 32-bit
platforms that we have at hand.  So there is no way for us to debug this
problem.  Better to disable the test.
[forum:/forumpost/ffcbf789b5386573|forum post ffcbf789b5386573].

FossilOrigin-Name: fed4d6e90baecca716429f95e1fab7930297afa2a191a87a0a87cb93910d1bce

2 years agoAdd makefile targets for fuzzcheck-asan and fuzzcheck-ubsan.
drh [Fri, 27 Oct 2023 17:40:46 +0000 (17:40 +0000)] 
Add makefile targets for fuzzcheck-asan and fuzzcheck-ubsan.

FossilOrigin-Name: 27fc14303a0c6942e8cf5017d66c7ff5fcbc700a6109a93768263370f608397e

2 years agoFix to Makefile.in so that the "tool-zip" target can be run from outside the source...
dan [Fri, 27 Oct 2023 15:31:44 +0000 (15:31 +0000)] 
Fix to Makefile.in so that the "tool-zip" target can be run from outside the source tree.

FossilOrigin-Name: cd118da9db0680fab8761ff44384639b9d564b67a5dfb1280ab72e44ff57714d

2 years agoCleanup shell.c comments. Hide -utf8 option, as it is undocumented and accepted only...
larrybr [Fri, 27 Oct 2023 13:59:05 +0000 (13:59 +0000)] 
Cleanup shell.c comments. Hide -utf8 option, as it is undocumented and accepted only for backward compatibility. No functional changes except for -help content.

FossilOrigin-Name: 3a87995560b5acbebeb5af407aa9eddf4c37c6a27ec9429ece0ea931918f9d9c

2 years agoBack out [2904fcbeebba9189], mostly. The page bitmap is needed even for a
drh [Fri, 27 Oct 2023 10:49:17 +0000 (10:49 +0000)] 
Back out [2904fcbeebba9189], mostly.  The page bitmap is needed even for a
partial integrity_check in order to avoid an infinite loops while walking the
database.

FossilOrigin-Name: dd6e03b37356e2961abd97f636402c09744c98c3033f3435503958c6219f9121

2 years agoIn CLI for Windows builds, do MBCS/UTF-8 translation independently for input and...
larrybr [Thu, 26 Oct 2023 18:41:13 +0000 (18:41 +0000)] 
In CLI for Windows builds, do MBCS/UTF-8 translation independently for input and output. (And cure an MSVC warning.)

FossilOrigin-Name: 80f0b6f9c76c049edaaaeedc1745978b9d5b02a9c34bbf64209266a154b2b0e3

2 years agoHandle utf8 mode restore better for redirected input or output. Move utf8 mode setup...
larrybr [Thu, 26 Oct 2023 18:24:41 +0000 (18:24 +0000)] 
Handle utf8 mode restore better for redirected input or output. Move utf8 mode setup to before any invocation command processing. Sync w/trunk.

FossilOrigin-Name: 59452e7c72de02c2b6d40974c91173d87fd5f6f2e28c0b1f6f53eb1a09693fb6

2 years agoEnhance the "tool-zip" makefile target on Windows so that it uses more
drh [Thu, 26 Oct 2023 17:30:54 +0000 (17:30 +0000)] 
Enhance the "tool-zip" makefile target on Windows so that it uses more
universally available commands to build the ZIP archive.  Fix other minor
issues with that makefile target at the same time.

FossilOrigin-Name: d2f2f9126562c24966b0e9bc3629b85950c20199c41250478ba1da68eb7a0046

2 years agoFurther enhancements to make sure the correct returnning trigger is run when
drh [Thu, 26 Oct 2023 16:59:22 +0000 (16:59 +0000)] 
Further enhancements to make sure the correct returnning trigger is run when
there are nested INSERT RETURNING statements.

FossilOrigin-Name: d83405e870b071540b56e76291bdce1388db80b860afd68a34e4233f6ff2a3ab

2 years agoHandle the case where a virtual table xBestIndex method called while coding a trigger...
dan [Thu, 26 Oct 2023 16:05:57 +0000 (16:05 +0000)] 
Handle the case where a virtual table xBestIndex method called while coding a trigger fired by a top-level statement with a RETURNING clause prepares a statement that also contains a RETURNING clause.

FossilOrigin-Name: ec6bffa3b0fbf7cdee852cb0208de1f5869dafd88e2ee64c23cec89634219adc

2 years agoReady for merge, but could use testing on some dusty old Windows machines.
larrybr [Thu, 26 Oct 2023 15:12:41 +0000 (15:12 +0000)] 
Ready for merge, but could use testing on some dusty old Windows machines.

FossilOrigin-Name: 20220615621e01ff83fd26133840e2553a6087bcb56bbb8e9bf1408dd881cd9b

2 years agoDeal with the case of a reentrant INSERT on a virtual table where the
drh [Thu, 26 Oct 2023 12:59:41 +0000 (12:59 +0000)] 
Deal with the case of a reentrant INSERT on a virtual table where the
outer INSERT has a RETURNING clause but the inner does not.
dbsqlfuzz 3ac9a1e33f676254e02c0f297263b0a7aeb0c1a5.

FossilOrigin-Name: 8aba78e4dbf5c196aa50a28579f4bcd7c96103661c5968d62b2fded075bc73e4

2 years agoCure a harmless MSVC warning. (no other changes)
larrybr [Wed, 25 Oct 2023 20:44:01 +0000 (20:44 +0000)] 
Cure a harmless MSVC warning. (no other changes)

FossilOrigin-Name: 02234ef85ed9349ddf6225f67b7e941b0b68cbd2e58c9d7d84a8324393349853

2 years agoIn CLI for Windows builds, do MBCS/UTF-8 translation independently for input and...
larrybr [Wed, 25 Oct 2023 20:27:18 +0000 (20:27 +0000)] 
In CLI for Windows builds, do MBCS/UTF-8 translation independently for input and output. (WIP)

FossilOrigin-Name: 47b13e66e07be3a26cf7fa0b7b65ad8576c3b4be50fc422be8fe93be93d681ac

2 years agoUpdates to the mktoolzip.tcl to work on win32. win32-mktoolzip
dan [Wed, 25 Oct 2023 20:08:21 +0000 (20:08 +0000)] 
Updates to the mktoolzip.tcl to work on win32.

FossilOrigin-Name: 166b775bb523362ffe17722ce175278726303c319fbe7e4a1e9291736db38a5d

2 years agoFix harmless compiler warnings.
drh [Wed, 25 Oct 2023 19:06:23 +0000 (19:06 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: cc8efe0494b8fe0df18aa67b1675779bf704d1ac53647fe1f7f55d8048041680

2 years agoProvide dummy parameter names in the prototype for the new xIntegrity method
drh [Wed, 25 Oct 2023 18:53:00 +0000 (18:53 +0000)] 
Provide dummy parameter names in the prototype for the new xIntegrity method
of the sqlite3_module object.

FossilOrigin-Name: 131374d720a365cbbe3031a2bc0a34ba1c74e751e39c66e484dbce07ab49fb62

2 years agoFix minor problems with the "showwal" utility program. Add a missing header
drh [Wed, 25 Oct 2023 18:35:48 +0000 (18:35 +0000)] 
Fix minor problems with the "showwal" utility program.  Add a missing header
to the zipfile.c extension.

FossilOrigin-Name: 7b3f866e619c2b781b613493727cd111335ceec690d984408725c756feff26e6