]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
2 years agoUpdate unhex() to allow a second argument, specifying a set of characters that are... unhex-function
dan [Tue, 24 Jan 2023 17:19:47 +0000 (17:19 +0000)] 
Update unhex() to allow a second argument, specifying a set of characters that are permitted to appear between pairs of hexadecimal digits.

FossilOrigin-Name: 66c8562690b19f17972589611810e1dccad3a48777acb05208289c1f77076f71

2 years agoAdd experimental user function unhex().
dan [Mon, 23 Jan 2023 14:11:34 +0000 (14:11 +0000)] 
Add experimental user function unhex().

FossilOrigin-Name: dbe424b5db33ce2c7562dfb44daf2969cf3074234cc891eb9b8d0d907faf6a78

2 years agoGive CLI .version a place in .help output.
larrybr [Sun, 22 Jan 2023 21:54:17 +0000 (21:54 +0000)] 
Give CLI .version a place in .help output.

FossilOrigin-Name: 5f2dfdcc345453ee0a05311f6826d90b7c1d7b95fdaf77a0a8383923a8fc7213

2 years agoMinor API doc cleanups and JS code simplification.
stephan [Sat, 21 Jan 2023 16:53:01 +0000 (16:53 +0000)] 
Minor API doc cleanups and JS code simplification.

FossilOrigin-Name: f608a3a45609693c1c0237f12c394275ec9a6225fa986e62345f21af763293a0

2 years agoFix a memory leak in the TCL test harness associated with carray.
drh [Sat, 21 Jan 2023 00:59:20 +0000 (00:59 +0000)] 
Fix a memory leak in the TCL test harness associated with carray.

FossilOrigin-Name: 5a316f9fd94b73fc54ef94a1dab2f13bdd16c4fb13d2620b7c907d104d5b4d7a

2 years agoFix harmless compiler warnings.
drh [Sat, 21 Jan 2023 00:19:29 +0000 (00:19 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: ded60f5b3431283d70eb8c41761c0fa9727021e6309d0df0ae3fb0a5274c1299

2 years agoExtend the carray extension to allow the use of BLOB values to be bound
drh [Fri, 20 Jan 2023 21:00:03 +0000 (21:00 +0000)] 
Extend the carray extension to allow the use of BLOB values to be bound
as an array of "struct iovec" objects.

FossilOrigin-Name: e117a03ca6560e958884f277db827c51ae337a970c17143a0a5f9b150f52f87a

2 years agoTwo branches associated with memdb are now always taken (I believe). Tag
drh [Fri, 20 Jan 2023 19:19:24 +0000 (19:19 +0000)] 
Two branches associated with memdb are now always taken (I believe).  Tag
them with ALWAYS() to verify this.

FossilOrigin-Name: 20b9b5aa4fa6136059cf1123f00d86cb7bd8fb0f0f86f971e9714f22725e60b5

2 years agoEnsure that the database encoding cannot be changed while there are statements runnin...
dan [Fri, 20 Jan 2023 17:50:24 +0000 (17:50 +0000)] 
Ensure that the database encoding cannot be changed while there are statements running. And that the connection is left in a valid state after an obscure OOM within sqlite3_deserialize().

FossilOrigin-Name: a02da71f3a80dd8e817e89cdaa775c95e38c90d2471f8fec516bed086539e2c0

2 years agoAdd tests for changing the database encoding via RESET_DATABASE/VACUUM. And test...
dan [Fri, 20 Jan 2023 15:13:30 +0000 (15:13 +0000)] 
Add tests for changing the database encoding via RESET_DATABASE/VACUUM. And test that it is not possible to trick another connection with this.

FossilOrigin-Name: b869054acb8f171cbc16808eb87be85e6e38d5c5670522ff4e49aef92250d5b2

2 years agoThe json_group_array(), json_group_object(), and fts5_source_id() functions
drh [Fri, 20 Jan 2023 13:34:14 +0000 (13:34 +0000)] 
The json_group_array(), json_group_object(), and fts5_source_id() functions
should all be deterministic and innocuous.

FossilOrigin-Name: edcb83fa0d3c832d044b267d608fed31a2ac841b81c7c9406b2136ac43d61a1a

2 years agoFix numbering issue in and remove duplicate test from windowB.test.
dan [Thu, 19 Jan 2023 18:16:09 +0000 (18:16 +0000)] 
Fix numbering issue in and remove duplicate test from windowB.test.

FossilOrigin-Name: fa10e561f5dcdb23af862c2e486e877d379f12eae077ae5fd3da6028f1c20b49

2 years agoEmit sqlite3-api.(m)js during the JS build process, which are the JS APIs without...
stephan [Wed, 18 Jan 2023 17:39:04 +0000 (17:39 +0000)] 
Emit sqlite3-api.(m)js during the JS build process, which are the JS APIs without the Emscripten/wasm-loading parts. They are hypothetically useful for arbitrary build environments/toolchains but have notable caveats related to the wasm imports, as elaborated on in the makefile.

FossilOrigin-Name: 966b55c513a14c6ab3ec128cfe6d157ecd9bec32e3fce2f559f130249cec50ab

2 years agoFix another issue with very large compressed LSM databases.
dan [Tue, 17 Jan 2023 19:34:01 +0000 (19:34 +0000)] 
Fix another issue with very large compressed LSM databases.

FossilOrigin-Name: d71154265a294a1ece89d257f55f6855db7c30aec55ea0dc4eeb61bce1e8fad3

2 years agoChange an now unreachable testcase() into an assert().
drh [Tue, 17 Jan 2023 19:00:22 +0000 (19:00 +0000)] 
Change an now unreachable testcase() into an assert().

FossilOrigin-Name: 517b2c4c4ee9afc50e5457a6877e5af34358a6267d8dad669d25410c124866ac

2 years agoFix harmless compiler warnings in the CLI.
drh [Tue, 17 Jan 2023 18:40:54 +0000 (18:40 +0000)] 
Fix harmless compiler warnings in the CLI.

FossilOrigin-Name: 7cf282d307a23697b38f5fd4b46f13f63a9e6f7cc74ccd66297d88c00aa8f454

2 years agoUpdate virtual tables json_each and json_tree so that adding "ORDER BY rowid" to...
dan [Tue, 17 Jan 2023 15:46:27 +0000 (15:46 +0000)] 
Update virtual tables json_each and json_tree so that adding "ORDER BY rowid" to a query does not require an external sort.

FossilOrigin-Name: ce18f0ed684824e67ed6c09acab8e735fef2c52b2ed32270dee1a2a67802c59b

2 years agoAdd test cases to confirm that the schema parsing quirk in which an
drh [Tue, 17 Jan 2023 13:33:51 +0000 (13:33 +0000)] 
Add test cases to confirm that the schema parsing quirk in which an
ON CONFLICT clause is accepted and ignored on table CHECK constraints but
raises an error on column CHECK constraints.  We want to continue supporting
this harmless quirk to avoid breaking legacy applications and databases that
accidentally use it.

FossilOrigin-Name: 92b6a9cd0fb027fe675b3913aa07c75445bba0cfac9530d08d7e48f7869c04cc

2 years agoCause .clone to not trip over sequence table as reported at [forum:/forumpost/71ff9e6...
larrybr [Mon, 16 Jan 2023 21:49:37 +0000 (21:49 +0000)] 
Cause .clone to not trip over sequence table as reported at [forum:/forumpost/71ff9e6c4c|forum post 71ff9e6c4c].

FossilOrigin-Name: b44d04f7b051d807a81152a6e4f15a765f7b9ed1f01b48b40dc5420c11e0c251

2 years agoIn the CLI, create our own private version of strncpy() to work around
drh [Mon, 16 Jan 2023 18:13:00 +0000 (18:13 +0000)] 
In the CLI, create our own private version of strncpy() to work around
false-positive compiler warnings from Alpine Linux.

FossilOrigin-Name: 83f21285fe86430a66ce6841606e3ad7c27da52ac75a034c6a00c7a9fdb9791d

2 years agoOmit the long-disused FTS1 and FTS2 implements from the active source tree.
drh [Sat, 14 Jan 2023 19:53:42 +0000 (19:53 +0000)] 
Omit the long-disused FTS1 and FTS2 implements from the active source tree.
The code will persist forever in the source repository, but there is no point
in carrying it around in the latest tarballs where it is never used.

FossilOrigin-Name: 2bb50d5aedef0fd216d94058f477a58d88aa3a68bbadc94fa67998b7c391a8ff

2 years agoAdd OOM check, per tip at [forum:/forumpost/933479b2d5|forum post 933479b2d5]
larrybr [Sat, 14 Jan 2023 19:27:40 +0000 (19:27 +0000)] 
Add OOM check, per tip at [forum:/forumpost/933479b2d5|forum post 933479b2d5]

FossilOrigin-Name: eda84dcffee6016fb3f8588d96c7ffb6275edd626b11f6fe12e81be90226c7d8

2 years agoDoc-only fix, per [forum:/forumpost/0cfaf6876b|forum post 0cfaf6876b]
larrybr [Sat, 14 Jan 2023 19:09:26 +0000 (19:09 +0000)] 
Doc-only fix, per [forum:/forumpost/0cfaf6876b|forum post 0cfaf6876b]

FossilOrigin-Name: eac135fd6a5dd220a0f7c1b61f987bbd801faabdb76846c4417fef0dd03fcb87

2 years agoFix another lsm compression-mode bug.
dan [Fri, 13 Jan 2023 20:49:42 +0000 (20:49 +0000)] 
Fix another lsm compression-mode bug.

FossilOrigin-Name: f9fafc941370f805f6656ac13543333b36ee52f1ad44c891252b99a74bd2ddf4

2 years agoIn expression nodes of type REGISTER with sub-type COLUMN, ensure that the
drh [Fri, 13 Jan 2023 19:29:46 +0000 (19:29 +0000)] 
In expression nodes of type REGISTER with sub-type COLUMN, ensure that the
iColumn field is set correctly, as otherwise the "IS NULL" operator might
be incorrectly optimized.  Fix for the problem described by
[forum:/forumpost/d010a26798915b53|forum post d010a26798915b53].

FossilOrigin-Name: 0819a1869a39d54a405259ea323365506a182962a02affdef16a03446005da64

2 years agoAdd missing "const" on variables in recent RBU fixes.
drh [Fri, 13 Jan 2023 18:20:40 +0000 (18:20 +0000)] 
Add missing "const" on variables in recent RBU fixes.

FossilOrigin-Name: 9b8dcd79050f9bfa745271f51377b38cfed4d8ce41a36b773a30799d69f7b943

2 years agoEnhance query planning so that it check for sqlite3_interrupt() calls and
drh [Fri, 13 Jan 2023 15:54:25 +0000 (15:54 +0000)] 
Enhance query planning so that it check for sqlite3_interrupt() calls and
periodically invokes the progress handler callback (if any) during long
query analyses.

FossilOrigin-Name: bd8fa10e59f58886e10c84ea9934fa1b5f491aac2eff302757a76d2d36d59b69

2 years agoUpdate documentation for sqlite3_progress_handler(). progress-during-prepare
drh [Fri, 13 Jan 2023 15:31:24 +0000 (15:31 +0000)] 
Update documentation for sqlite3_progress_handler().

FossilOrigin-Name: 41b4c407b7f6968f4493fb9a0b220c55a6f6a353a8e6cb054efd3eb01bdd11dc

2 years agoRemove an incorrect legacy assert().
drh [Fri, 13 Jan 2023 11:31:49 +0000 (11:31 +0000)] 
Remove an incorrect legacy assert().

FossilOrigin-Name: 3006b3b32fb1efedde3ade418c19c35b6e9a4af1e6a7cb5d5c72a080ec1f6f3c

2 years agoReduce the frequency of calls to sqlite3ProgressCheck().
drh [Thu, 12 Jan 2023 20:36:43 +0000 (20:36 +0000)] 
Reduce the frequency of calls to sqlite3ProgressCheck().

FossilOrigin-Name: 795aca4a269ea4ede547844037c218ac714c40e8bee003e4d9b786befc9cf97a

2 years agoFix sqlite3_prepare() so that it only invokes the progress handler on every
drh [Thu, 12 Jan 2023 19:51:49 +0000 (19:51 +0000)] 
Fix sqlite3_prepare() so that it only invokes the progress handler on every
N-th call to sqlite3ProgressCheck(), where N is the progress handler step
count.  Also fix faulty asserts exposed by the ability to interrupt in the
middle of sqlite3_prepare().

FossilOrigin-Name: 05461651599bb490ac6cfd893645dabab9cccedc6adcce15aee2487b2ea6027a

2 years agoDo not attempt to run new test file rbupass.test if the "demo" VFS is not available.
dan [Thu, 12 Jan 2023 19:28:34 +0000 (19:28 +0000)] 
Do not attempt to run new test file rbupass.test if the "demo" VFS is not available.

FossilOrigin-Name: c5d958eb942a8d6ea1e6e1d2d57637f9359d518965a28f298c7fbacdb9080f59

2 years agoAvoid crashing when using an RBU VFS with a version 1 parent VFS.
dan [Thu, 12 Jan 2023 19:11:41 +0000 (19:11 +0000)] 
Avoid crashing when using an RBU VFS with a version 1 parent VFS.

FossilOrigin-Name: d149772d18c47bf986decb7e08d148b1d417bbcc8522fd6240ead836ec34074b

2 years agoWhen deleting any old OAL file before starting an RBU update or vacuum, use the same...
dan [Thu, 12 Jan 2023 17:13:44 +0000 (17:13 +0000)] 
When deleting any old OAL file before starting an RBU update or vacuum, use the same VFS as will be used for the target database, even if this is not the system default.

FossilOrigin-Name: 5a86c6cb1f16a15bdbc42544b8ed1912d9e87f04c514b8481a77442fbbd8accf

2 years agoAttempt to provide a mechanism to do early termination of long-running
drh [Thu, 12 Jan 2023 13:25:48 +0000 (13:25 +0000)] 
Attempt to provide a mechanism to do early termination of long-running
statement preparation by invoking the progress handler at strategic points
during sqlite3_parpare().  This experiment shows that sqlite3_prepare() might
leave the resulting prepared statement uninitialized following an interrupt.

FossilOrigin-Name: 79636f2d80aee70832913a78933da2a7e30cc037810b93903ebbc1925ea93fef

2 years agoFix duplicate semicolon in btreeInt.h.
drh [Wed, 11 Jan 2023 20:52:15 +0000 (20:52 +0000)] 
Fix duplicate semicolon in btreeInt.h.
[forum:/forumpost/8db1711ca2|Forum post 8db1711ca2]

FossilOrigin-Name: 7526c46632578a2b602622b9debc406b52af4a42cc880970c4307d13853d59d3

2 years agoFix a false-positive in the out-of-range jump detection logic that was
drh [Wed, 11 Jan 2023 17:59:18 +0000 (17:59 +0000)] 
Fix a false-positive in the out-of-range jump detection logic that was
added as part of RIGHT JOIN.

FossilOrigin-Name: ab5bcb91cda45576ae9f3f272ec92eb3be3c26436a440ebb89f51f49c42e0fd2

2 years agoIf OP_Rewind has P2 of zero, that is an assertion that the table is never code-generator-20230111
drh [Wed, 11 Jan 2023 17:50:24 +0000 (17:50 +0000)] 
If OP_Rewind has P2 of zero, that is an assertion that the table is never
empty.  This fixes a false-positive in the out-of-subroutine jump detection
logic added in version 3.39.0, and which was causing the assertion on the
previous check-in.

FossilOrigin-Name: 33fd9997ebb88f0d78522c036e75aef08015d31d28b1cbee08ae7c4cd5ecc6aa

2 years agoAdd an assert() to the byte-code engine that goes off if the OP_Halt opcode
drh [Wed, 11 Jan 2023 16:44:57 +0000 (16:44 +0000)] 
Add an assert() to the byte-code engine that goes off if the OP_Halt opcode
is invoked with SQLITE_INTERNAL.  This causes the RIGHT JOIN error
"Opcode jumps to ... which is outside the subroutine ..." to fail immediately,
causing it to come more readily to tester's attention.  There is at least
one testcase in test/fuzzdata8.db that asserts due to this change.

FossilOrigin-Name: b8f994414285264f4f7c472dfad646a061fc3580b754eac0f20080c24ecc256d

2 years agoFix problems with compressed LSM databases larger than 2GiB.
dan [Wed, 11 Jan 2023 16:25:55 +0000 (16:25 +0000)] 
Fix problems with compressed LSM databases larger than 2GiB.

FossilOrigin-Name: f884224578e549c7a15cd710e351c675631bd8939bd1d353b4337dcf4144c868

2 years agoImproved progress-handler and interrupt detection during PRAGMA integrity_check.
drh [Wed, 11 Jan 2023 16:17:31 +0000 (16:17 +0000)] 
Improved progress-handler and interrupt detection during PRAGMA integrity_check.

FossilOrigin-Name: 6db42780a9e530bcc94490cc6080536309666dc13523272d1799d6661137e908

2 years agoFix another 64-bit offset problem in lsm. lsm-compress-fixes
dan [Wed, 11 Jan 2023 16:02:20 +0000 (16:02 +0000)] 
Fix another 64-bit offset problem in lsm.

FossilOrigin-Name: 1f3d0bdc20aa74a595f7bb7b2c152259a9d3a8ffbe7cc229c57ad2142df5376d

2 years agoAdd a new sqlite3_is_interrupted() interface that can be used by long-running
drh [Wed, 11 Jan 2023 00:27:06 +0000 (00:27 +0000)] 
Add a new sqlite3_is_interrupted() interface that can be used by long-running
app-defined functions and similar to see if they need to exit early due to
an sqlite3_interrupt() call.

FossilOrigin-Name: d030f341369b7f32789cbcf3d0ad9a2ac5cad99a56dac7dfe68b7f06dc339b17

2 years agoWhen computing the datatypes for columns in a view, use the same datatype name
drh [Tue, 10 Jan 2023 19:57:26 +0000 (19:57 +0000)] 
When computing the datatypes for columns in a view, use the same datatype name
as the underlying table if such is available and is consistent with
the computed affinity of the column.
[forum:/forumpost/7fb1fe9dcf310ef5|Forum thread 7fb1fe9dcf310ef5].

FossilOrigin-Name: 497a98363fd1ed079544620ec5d0883f987ed03013131542741c93d7568e8568

2 years agoFix handling of unix paths that contain ".." components such that "/" is considered...
dan [Tue, 10 Jan 2023 15:07:18 +0000 (15:07 +0000)] 
Fix handling of unix paths that contain ".." components such that "/" is considered its own parent directory.

FossilOrigin-Name: b829dd1b976454619ca04c69aec5ebb5a2286772f4267b82ab2ea5fdb81ccd41

2 years agoImprovements to the SQLITE_DIRECTONLY documentation.
drh [Tue, 10 Jan 2023 14:33:26 +0000 (14:33 +0000)] 
Improvements to the SQLITE_DIRECTONLY documentation.

FossilOrigin-Name: b277ba40a8b0acea15bd73036d1c86fb5187f047ec8500ebc88c738ea3dbd118

2 years agoFix handling of unix paths that contain ".." components such that "/" is considered... unix-path-fix
dan [Tue, 10 Jan 2023 14:31:56 +0000 (14:31 +0000)] 
Fix handling of unix paths that contain ".." components such that "/" is considered its own parent directory.

FossilOrigin-Name: 3c6cadb396de3981bd950eddd532daa8134bd4bf22c578620e323835c96a8500

2 years agoFix some problems with large, compressed, lsm databases.
dan [Mon, 9 Jan 2023 21:10:42 +0000 (21:10 +0000)] 
Fix some problems with large, compressed, lsm databases.

FossilOrigin-Name: 956e985ff9bf8f21a048e49f7190bcc52ec4a7d35ecd685b0a293a01c9777a96

2 years agoClarify help for .quit.
larrybr [Mon, 9 Jan 2023 18:42:28 +0000 (18:42 +0000)] 
Clarify help for .quit.

FossilOrigin-Name: 8004a2b7439748f1034df897af7b6c58b48a46923c6fdddbe7d78c89b8d7b438

2 years agoFix JSON functions so that they work correctly under PRAGMA trusted_schema.
drh [Mon, 9 Jan 2023 12:01:30 +0000 (12:01 +0000)] 
Fix JSON functions so that they work correctly under PRAGMA trusted_schema.
[forum:/forumpost/c88a671ad083d153|Forum thread c88a671ad083d153].

FossilOrigin-Name: 51a5d83c425d2e31508b73074d0076156817afb19003f847d16bf4a69ae5077b

2 years agoDoc-only update, sqlite3_preupdate_hook() return
larrybr [Sat, 7 Jan 2023 22:28:00 +0000 (22:28 +0000)] 
Doc-only update, sqlite3_preupdate_hook() return

FossilOrigin-Name: 2da51d7e1b9f16ef03efbb096ce2a84e8c23b883380f48b2d374bdc521865aeb

2 years agoAccount for read-only connections on databases with non-default block or page sizes.
dan [Sat, 7 Jan 2023 13:40:32 +0000 (13:40 +0000)] 
Account for read-only connections on databases with non-default block or page sizes.

FossilOrigin-Name: 3a2075b089ecdb4b55243235dfabf466ea7999c2118aa8f58300925fb75c884e

2 years agoChanges a testcase() into an assert() due to the
drh [Thu, 5 Jan 2023 14:41:18 +0000 (14:41 +0000)] 
Changes a testcase() into an assert() due to the
[e58bba93717cd6ff] change.

FossilOrigin-Name: a6251d72894f9c2e21fc6e91b1d2452a204952f5e1a94fd93835a47c7dfb9be3

2 years agoFix a problem with applying integer affinity to a MEM_IntReal value. Forum post ...
dan [Thu, 5 Jan 2023 13:35:23 +0000 (13:35 +0000)] 
Fix a problem with applying integer affinity to a MEM_IntReal value. Forum post [forum:/forumpost/d270125fae|forum post d270125fae].

FossilOrigin-Name: e58bba93717cd6ff950c6f9e077b4327b59b1956dd5f6668be3de9509584b8fe

2 years agoIn the zipvfile extension (which is not part of the SQLite amalgamation, but
drh [Thu, 5 Jan 2023 01:26:58 +0000 (01:26 +0000)] 
In the zipvfile extension (which is not part of the SQLite amalgamation, but
which is included in the CLI by default) ensure that fopen() is not invoked
using a NULL filename.  Fix for the issue reported by
[forum:/forumpost/d1c96a9032e564f8|forum post d1c96a9032e564f8].

FossilOrigin-Name: d32757ddf5d311b6f62545c861fd606244e03f02cb2e317c1131ee6b80c2299c

2 years agoAdjustements to the tool/warnings.sh script to account for compiler
drh [Wed, 4 Jan 2023 18:32:14 +0000 (18:32 +0000)] 
Adjustements to the tool/warnings.sh script to account for compiler
differences.

FossilOrigin-Name: 863c03bee117e81bcea8c3ae78bf125afc7750aa5bcb89e42ee66d9c8b6ddc29

2 years agoEnsure that LIMIT clauses may be passed through to virtual table implementations...
dan [Wed, 4 Jan 2023 17:46:29 +0000 (17:46 +0000)] 
Ensure that LIMIT clauses may be passed through to virtual table implementations even if the WHERE clause uses operators that may only be optimized by virtual, not built-in, tables (!=, functions, MATCH etc.).

FossilOrigin-Name: f38caab23bcef1df02618376de22d208a3333d023628cde310345505933329f1

2 years agoEmploy deliberate_fall_through macro to quiet some compilers.
larrybr [Wed, 4 Jan 2023 16:54:55 +0000 (16:54 +0000)] 
Employ deliberate_fall_through macro to quiet some compilers.

FossilOrigin-Name: 869635fb81e0868dee80ce77653a2c1d2af41b3ffbf0a3f7b788ac99dc808887

2 years agoEnhance PRAGMA integrity_check so that it verifies that the string values
drh [Wed, 4 Jan 2023 15:18:52 +0000 (15:18 +0000)] 
Enhance PRAGMA integrity_check so that it verifies that the string values
stored in indexes are byte-for-byte identical to the values in the table, and
not just equivalent according to the collating sequence.
dbsqlfuzz 686e2e205e0c0594d3fb524bea0c25e621d1a870.

FossilOrigin-Name: 9302e4bfdce5905576b8f0af7d6b3a864e1dcd58ed89bb303010a1c4f826e915

2 years agoRemove the unused "sqlite3StackAllocZero()" macro.
drh [Wed, 4 Jan 2023 11:58:36 +0000 (11:58 +0000)] 
Remove the unused "sqlite3StackAllocZero()" macro.

FossilOrigin-Name: f0ca57207e9f3ab401264498f65c249b479d9e0da7158e001b002584ac67dd0a

2 years agoElaborate on the open-in-read-only fallback behavior of the SQLITE_OPEN_READWRITE...
stephan [Wed, 4 Jan 2023 11:57:27 +0000 (11:57 +0000)] 
Elaborate on the open-in-read-only fallback behavior of the SQLITE_OPEN_READWRITE flag, per user request. Unrelated trailing EOL whitespace cleanups.

FossilOrigin-Name: 1003144fc192e1531e1bc968d7e1d0ccc7ad31e501180f90e1479565a4abfb96

2 years agoRemove the JS-side SQLITE_WASM_DEALLOC sanity check which triggers the problem mentio...
stephan [Wed, 4 Jan 2023 03:14:06 +0000 (03:14 +0000)] 
Remove the JS-side SQLITE_WASM_DEALLOC sanity check which triggers the problem mentioned in [688c5c13d156] and [ae0196d86ee8], for reasons covered in the code comments, per discussion in [forum:e5b20e1feb|forum post e5b20e1feb].

FossilOrigin-Name: 65ff3200c6009a1649fc108d7ce36f5c014185ba46bbf98471ec86eaeb572656

2 years agoSmall performance increase in the symbol hash table.
drh [Tue, 3 Jan 2023 19:27:00 +0000 (19:27 +0000)] 
Small performance increase in the symbol hash table.

FossilOrigin-Name: a19597b4fd2530a89363992b9179f9f3f0621a6e3861a91324f29311aafe09b9

2 years agoAvoid an unnecessary call to strlen() in the sqlite3VdbeMemStringify() routine,
drh [Tue, 3 Jan 2023 18:51:18 +0000 (18:51 +0000)] 
Avoid an unnecessary call to strlen() in the sqlite3VdbeMemStringify() routine,
for a performance increase and size reduction.

FossilOrigin-Name: 284382d37850f469dc4bf3ab8efd2f20971554e897f1ba3e94d3f2f0c35d97d0

2 years agoSmall performance improvement in the btreeOverwriteCell() routine.
drh [Tue, 3 Jan 2023 15:11:01 +0000 (15:11 +0000)] 
Small performance improvement in the btreeOverwriteCell() routine.

FossilOrigin-Name: df5ea47130d275e9fa1bd6aa8d55f1d5e136cba30ba13b7ede22224aa7f78919

2 years agoAdd some docs explaining a particular piece of [ae0196d86ee8]. No code changes.
stephan [Mon, 2 Jan 2023 20:52:46 +0000 (20:52 +0000)] 
Add some docs explaining a particular piece of [ae0196d86ee8]. No code changes.

FossilOrigin-Name: 7f96803c1cbd0633367173ab0a67a8b301b9e0746e460c50d506b536c15db0a0

2 years agoAnother reformulation of SQLITE_WASM_DEALLOC to attempt to work around a Safari-speci...
stephan [Mon, 2 Jan 2023 20:07:30 +0000 (20:07 +0000)] 
Another reformulation of SQLITE_WASM_DEALLOC to attempt to work around a Safari-specific quirk reported in [forum:5489305f601b8c3f|forum post 5489305f601b8c3f].

FossilOrigin-Name: ae0196d86ee8ca424b5ef5a43c32988f4ab5131ea146669bc1467e31a2384901

2 years agoAn alternative solution to mapping SQLITE_WASM_DEALLOC to the proper function pointer...
stephan [Sun, 1 Jan 2023 12:22:16 +0000 (12:22 +0000)] 
An alternative solution to mapping SQLITE_WASM_DEALLOC to the proper function pointer in JS, to account for a Safari-specific quirk reported in [forum:e5b20e1feb|forum post e5b20e1feb].

FossilOrigin-Name: 688c5c13d156f987b895df1d5a5b770616b0d9caec4726e03ba122eb8539e7b2

2 years agoRemove redundant assignment in kvvfs's decoding.
peter.d.reid [Sat, 31 Dec 2022 05:26:35 +0000 (05:26 +0000)] 
Remove redundant assignment in kvvfs's decoding.

FossilOrigin-Name: 2ffbf0c73c5a0f08717093cfaac99c4aedee506ec7b5a9a62c92168a2bcadc14

2 years agoAvoid an infinite loop when an unexpected character is being decoded by kvvfs
peter.d.reid [Sat, 31 Dec 2022 05:19:45 +0000 (05:19 +0000)] 
Avoid an infinite loop when an unexpected character is being decoded by kvvfs

FossilOrigin-Name: 6909195f77b50650982a6afd9d72b3a6ac9aff1f86c653fa18d0d9bf64e9bd8f

2 years agoA call to sqlite3_declare_vtab() should not cause DML/DDL authorization
drh [Thu, 29 Dec 2022 18:54:15 +0000 (18:54 +0000)] 
A call to sqlite3_declare_vtab() should not cause DML/DDL authorization
failures.

FossilOrigin-Name: eed1e030722deb24674e7c2d165a2a359576c6bb5769d3bdd5fa645bc0f2ecc7

2 years agoAdd sqlite3changeset_new/old_js(), which work like sqlite3_preupdate_new/old_js(...
stephan [Tue, 27 Dec 2022 22:46:49 +0000 (22:46 +0000)] 
Add sqlite3changeset_new/old_js(), which work like sqlite3_preupdate_new/old_js() but on changesets.

FossilOrigin-Name: e8afad630b085a9208491e0516a6a30c9cda77a20b1aa2cba49b2f44eb9fa2f8

2 years agoExpose sqlite3_preupdate_hook() and friends to the JS API.
stephan [Tue, 27 Dec 2022 14:34:32 +0000 (14:34 +0000)] 
Expose sqlite3_preupdate_hook() and friends to the JS API.

FossilOrigin-Name: cc02783a1210a083683320fae1ec1519e45b8e3003a9e32809d808513a2ce06b

2 years agoFix a missing 0 at the end of an integer literal in check-in [8da0f0c38a458c57]
drh [Tue, 27 Dec 2022 14:03:04 +0000 (14:03 +0000)] 
Fix a missing 0 at the end of an integer literal in check-in [8da0f0c38a458c57]

FossilOrigin-Name: e3776796f55574f357eb429e20399389092a68e9ca00aa104ed33eb559ae0de5

2 years agoFix a broken assert() in fts5.
dan [Tue, 27 Dec 2022 13:52:25 +0000 (13:52 +0000)] 
Fix a broken assert() in fts5.

FossilOrigin-Name: ff5a9b054f4d5ad3d33787aee93b4181822c6dfc513626236d9867bb431f64da

2 years agoAdd links to module-symbols.html for newly-added APIs.
stephan [Tue, 27 Dec 2022 12:25:28 +0000 (12:25 +0000)] 
Add links to module-symbols.html for newly-added APIs.

FossilOrigin-Name: 335ef03eb9694d1fd123f113f235cd34e97834fadc5f7c80489b6513be45d070

2 years agoAdd two more tests to [f99f8e3ecfe20].
stephan [Tue, 27 Dec 2022 12:17:20 +0000 (12:17 +0000)] 
Add two more tests to [f99f8e3ecfe20].

FossilOrigin-Name: 9cffccd335b11feb6a5beadb26e1a68af7b6b1b3c953063dcf6ef74edf3c59b1

2 years agoExpose sqlite3_commit/rollback/update_hook() to JS API.
stephan [Tue, 27 Dec 2022 12:13:01 +0000 (12:13 +0000)] 
Expose sqlite3_commit/rollback/update_hook() to JS API.

FossilOrigin-Name: f99f8e3ecfe205337996ee61c0b9f139d3e8788b14f32e26560888b3a16564de

2 years agoAdd an optional argument to oo1.DB.transaction() to specify an explicit BEGIN qualifier.
stephan [Tue, 27 Dec 2022 11:40:05 +0000 (11:40 +0000)] 
Add an optional argument to oo1.DB.transaction() to specify an explicit BEGIN qualifier.

FossilOrigin-Name: 507335c12b1dbe21d180cf6f0a0deb4cc737417acb44c8f1d8fac98b86f62b01

2 years agoExpose the auto-extension API to JS and reorganize some nearby code.
stephan [Mon, 26 Dec 2022 17:15:05 +0000 (17:15 +0000)] 
Expose the auto-extension API to JS and reorganize some nearby code.

FossilOrigin-Name: 52b229d11d82bfb81c8b63e252c51c57a34dc50498dd685451588c185873c628

2 years agoFix an infinite loop in the MEMSYS5 auxiliary memory allocator that occurs
drh [Mon, 26 Dec 2022 15:14:24 +0000 (15:14 +0000)] 
Fix an infinite loop in the MEMSYS5 auxiliary memory allocator that occurs
for memory allocations between 1GiB and 2GiB in size.  Error introduced
by check-in [949133231f8f751a].  The problem only affects builds that
include the SQLITE_ENABLE_MEMSYS5 compile-time option.

FossilOrigin-Name: 8da0f0c38a458c57f979d59b49cf4804ef81fc2eccabde1f166bab24dd1dabea

2 years agoDocument sqlite3.capi.sqlite3_prepare_v3() as accepting an ArrayBuffer and ensure...
stephan [Mon, 26 Dec 2022 15:08:48 +0000 (15:08 +0000)] 
Document sqlite3.capi.sqlite3_prepare_v3() as accepting an ArrayBuffer and ensure that it can.

FossilOrigin-Name: ae3ae92ec45d3d5de92e70876502f8108fc3fcd87848e86c2b83f8842f1ff139

2 years agoCorrect some internal-use JS docs and update the 'string:flexible' type conversion...
stephan [Mon, 26 Dec 2022 14:55:00 +0000 (14:55 +0000)] 
Correct some internal-use JS docs and update the 'string:flexible' type conversion to accept an ArrayBuffer (as it was recently documented to).

FossilOrigin-Name: eff5d3bec29043cc1182bbb5229040dac5ff50264d025e354736bb63b4bc97a0

2 years agoOnly add an on-db-close cleanup entry for collations if adding the collation succeeds...
stephan [Mon, 26 Dec 2022 14:25:21 +0000 (14:25 +0000)] 
Only add an on-db-close cleanup entry for collations if adding the collation succeeds and xCompare is-a JS function.

FossilOrigin-Name: 18a5480f1e0dca55703b43fa17685a4cc577cab8841ce47c807af02348ad85ee

2 years agoExtend [0e69b2c379e618] to support uninstalling stale JS-to-WASM function pointers...
stephan [Mon, 26 Dec 2022 13:45:10 +0000 (13:45 +0000)] 
Extend [0e69b2c379e618] to support uninstalling stale JS-to-WASM function pointers added on behalf of UDFs.

FossilOrigin-Name: 7a46e629dcbf97ae037c5abb39306af7ad55f1910c1e962373e09d88d8bd5a33

2 years agoAdd JS infrastructure which enables sqlite3.capi.sqlite3_close_v2() to clean up stale...
stephan [Mon, 26 Dec 2022 13:00:58 +0000 (13:00 +0000)] 
Add JS infrastructure which enables sqlite3.capi.sqlite3_close_v2() to clean up stale JS-to-WASM collation function conversions installed on behalf of a given db handle. The same for UDF mappings is TODO.

FossilOrigin-Name: 0e69b2c379e61893c7db8a9c9d270650f2bd63b6cea30811d41136392a2e4f04

2 years agoReimplement sqlite3.capi.sqlite3_close_v2() and sqlite3session_delete() as a hand...
stephan [Mon, 26 Dec 2022 11:13:09 +0000 (11:13 +0000)] 
Reimplement sqlite3.capi.sqlite3_close_v2() and sqlite3session_delete() as a hand-written bindings so that they can attempt to clean up certain (potentially) FuncPtrAdapter-installed functions before closing. Correct the create-function family of JS-to-function-pointer automated conversions to include the UDF's arity as part of the mapping's key so that (un)binding a UDF to different functions for different arities works (and add tests confirming it). Correct a broken doc link in module-symbols.html.

FossilOrigin-Name: 60b262ef0f57b162c2566b12e70685a92afb00b441332ea7a6540fcb188cc7af

2 years agoGrammar fixup in comment re SQLITE_TRACE_PROFILE trace event.
larrybr [Mon, 26 Dec 2022 01:44:04 +0000 (01:44 +0000)] 
Grammar fixup in comment re SQLITE_TRACE_PROFILE trace event.

FossilOrigin-Name: b6dc80cbf63ed521ef8f878fba24b0110d61813763ca7bfbcfb0a145656b300a

2 years agomodule-symbols.html: add some missing links to C-side API docs for recently-added...
stephan [Sun, 25 Dec 2022 23:54:16 +0000 (23:54 +0000)] 
module-symbols.html: add some missing links to C-side API docs for recently-added JS counterparts.

FossilOrigin-Name: 7d4f4e96f33f37b0774cb8df22ed1ef33062534653a4fadf606704b855e28c49

2 years agoUpdate JS worker #1 API and related tests for recent API changes.
stephan [Sun, 25 Dec 2022 23:45:59 +0000 (23:45 +0000)] 
Update JS worker #1 API and related tests for recent API changes.

FossilOrigin-Name: d797e183e96e04520636865204c02307b751fdc2949a04587de9259a1733e37b

2 years agoRename the new wasm.irSizeof() to sizeofIR() because that seems clearer.
stephan [Sun, 25 Dec 2022 22:55:45 +0000 (22:55 +0000)] 
Rename the new wasm.irSizeof() to sizeofIR() because that seems clearer.

FossilOrigin-Name: 49a83ca3ba46d3ae8021fbdd72b48ce9181eea6845fa7bb7aa83b16fad1728be

2 years agoMinor internal API doc correction and extend a test for oo1.DB.selectValues().
stephan [Sun, 25 Dec 2022 22:49:55 +0000 (22:49 +0000)] 
Minor internal API doc correction and extend a test for oo1.DB.selectValues().

FossilOrigin-Name: b7295b1ca700945ae4e89be69f954dce9960e8975664e620898392b2cc78d452

2 years agoAdd sqlite3.oo1.DB.selectValues(). Correct a logic error which could cause DB.selectV...
stephan [Sun, 25 Dec 2022 22:44:13 +0000 (22:44 +0000)] 
Add sqlite3.oo1.DB.selectValues(). Correct a logic error which could cause DB.selectValue(), DB.selectArray(), and DB.selectObject() to fail to finalize a statement if a call to bind() failed. Add more session API tests.

FossilOrigin-Name: 6adc8a10146190037d55d3328d2f78aa5233559f88d4aa70fbbf9e10145b9b6c

2 years agoMerge wasm-session-api branch into trunk, adding the session API to the JS/WASM compo...
stephan [Sun, 25 Dec 2022 20:25:44 +0000 (20:25 +0000)] 
Merge wasm-session-api branch into trunk, adding the session API to the JS/WASM components.

FossilOrigin-Name: dfb8b651fa4faef2d3307a05512cdc479398484c3a59715827179c363861a777

2 years agoAdd basic session API JS tests. wasm-session-api
stephan [Sun, 25 Dec 2022 20:22:20 +0000 (20:22 +0000)] 
Add basic session API JS tests.

FossilOrigin-Name: 64e032602cf420851c8029603c76f5512000d1c9a40fa7a545528d69d6d1d4cc

2 years agoAdd sqlite3.wasm.irSizeof() and extend certain allocation functions to make use of it.
stephan [Sun, 25 Dec 2022 20:05:11 +0000 (20:05 +0000)] 
Add sqlite3.wasm.irSizeof() and extend certain allocation functions to make use of it.

FossilOrigin-Name: 1cbc7b1875e8611b9db7a747b4c9499501450deaf90c929d212511837d6f72b6

2 years agoAdd tests confirming that JS sqlite3_exec()'s SQL argument participates in the 'strin...
stephan [Sun, 25 Dec 2022 17:12:24 +0000 (17:12 +0000)] 
Add tests confirming that JS sqlite3_exec()'s SQL argument participates in the 'string:flexible' type conversion.

FossilOrigin-Name: 926d0c61a391c601adc2804d3fdaa8b667ae2abd565939cddfa12d5151b098f8

2 years agoReplace the "manual" implementation of sqlite3.capi.sqlite3_exec() with a briefer...
stephan [Sun, 25 Dec 2022 17:09:34 +0000 (17:09 +0000)] 
Replace the "manual" implementation of sqlite3.capi.sqlite3_exec() with a briefer "automated" one via the [7f9ace1b11a67] feature addition. Minor code-adjacent internal cleanups.

FossilOrigin-Name: 4888957baf18c6763f959fbba998a74156ff656368779107f502b926e9e9d949

2 years agoRemove duplicated JS binding of sqlite3changeset_apply_v2().
stephan [Sun, 25 Dec 2022 16:20:05 +0000 (16:20 +0000)] 
Remove duplicated JS binding of sqlite3changeset_apply_v2().

FossilOrigin-Name: 2e8336b6e1cba89dbcc11d6316e39c929bf8b018a18b92efc232abd47e0a5cc6

2 years agoAdd the address of the associated db handle to the sqlite3_trace_v2() output originat...
stephan [Sun, 25 Dec 2022 15:28:19 +0000 (15:28 +0000)] 
Add the address of the associated db handle to the sqlite3_trace_v2() output originating from sqlite3.oo1.DB's trace flag.

FossilOrigin-Name: 0a36568c5a3db56a8ad23fd8abc672c5a7f1abed55984d902842ffd3ebb816e8