]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 days agoSpecial case the "decimal(-0.0)" output to show exactly 0.0, just as it
drh [Wed, 24 Sep 2025 17:49:09 +0000 (17:49 +0000)] 
Special case the "decimal(-0.0)" output to show exactly 0.0, just as it
does for positive zero.
[forum:/forumpost/adc719d88d56ab22|Forum post adc719d88].

FossilOrigin-Name: 9ca4163bd93d78be5e4daf2b5d2b920d54d038c6fa8217dd2add0be0da6cd6b0

11 days agoFix a harmless compiler warning in IEEE754.
drh [Wed, 24 Sep 2025 17:38:13 +0000 (17:38 +0000)] 
Fix a harmless compiler warning in IEEE754.

FossilOrigin-Name: 7f72308322cd1f238e6c725ec6bff44ed42fb2619f3f52afe38e2faad838a63f

11 days agoAdditional short-circuit optimizations for AND/OR operators. Also fix
drh [Wed, 24 Sep 2025 17:07:15 +0000 (17:07 +0000)] 
Additional short-circuit optimizations for AND/OR operators.  Also fix
bugs in prior implementations (such as [0083d5169a46104a]).

FossilOrigin-Name: 63b686fe4cb1d5d82dd3a399aaafd1dfcbda533ca83b46ed2bc2750baa7f251d

11 days agoSimplification to the AND/OR short-circuit logic. short-circuit
drh [Wed, 24 Sep 2025 16:26:44 +0000 (16:26 +0000)] 
Simplification to the AND/OR short-circuit logic.

FossilOrigin-Name: 7be555a3b8500c43c2f30171af26bcda9bcb68f41992b792228218a56315e7c4

11 days agoImprove performance of window function queries that use "BETWEEN :x FOLLOWING AND...
dan [Wed, 24 Sep 2025 16:10:46 +0000 (16:10 +0000)] 
Improve performance of window function queries that use "BETWEEN :x FOLLOWING AND :y FOLLOWING" where :y is a very large number.

FossilOrigin-Name: 1f0b7143575634929c0f77bafa888f0be2dd83f0c6c3deadd8299ac4ab8a8c01

11 days agoFixes to short-circuit AND/OR evaluation.
drh [Wed, 24 Sep 2025 14:43:42 +0000 (14:43 +0000)] 
Fixes to short-circuit AND/OR evaluation.

FossilOrigin-Name: bc4cadbd60b97d000d2e8be843acab9d82ddf10a8125fd9cc0ae101bb9850091

11 days agoFactor out the code that handles AND and OR short-circuiting into a
drh [Wed, 24 Sep 2025 13:10:55 +0000 (13:10 +0000)] 
Factor out the code that handles AND and OR short-circuiting into a
separate subroutine, for performance and legibility.

FossilOrigin-Name: cab84a65c3825c59f3a7a750f4983563ce7ad007125cbcf35c187326289fea89

11 days agoFix incorrect buffer size computation for the base64() extension function.
drh [Wed, 24 Sep 2025 12:01:50 +0000 (12:01 +0000)] 
Fix incorrect buffer size computation for the base64() extension function.
[forum:/forumpost/b1993c858f|Forum post b1993c858f].

FossilOrigin-Name: 603efcd404f0013559ca5bd936fc39481a3aa33a10340bac27b751b6b286d0b7

11 days agoRestrict the size of the LIMIT on a generate_series() query to avoid
drh [Wed, 24 Sep 2025 11:12:26 +0000 (11:12 +0000)] 
Restrict the size of the LIMIT on a generate_series() query to avoid
an integer overflow when computing the final output value.
[forum:/forumpost/479bfb0d3b|Forum post 479bfb0d3b].

FossilOrigin-Name: 266aacb4759945f7cf7a258014620f21225261246edc08e6e71ff5292baf22f3

11 days agoImproved short-circuit evaluation of AND and OR. All appears to work, but
drh [Wed, 24 Sep 2025 00:13:28 +0000 (00:13 +0000)] 
Improved short-circuit evaluation of AND and OR.  All appears to work, but
there are still testing and performance issues to be worked out.

FossilOrigin-Name: 0d4447aa61848deecf9170afce031f7b353b91d58474f3f094ce34e46be7f99e

12 days agoImprovements to short-circuit evaluation of AND and OR operators.
drh [Tue, 23 Sep 2025 17:00:53 +0000 (17:00 +0000)] 
Improvements to short-circuit evaluation of AND and OR operators.
This is a partial and incomplete response to
[forum:/forumpost/f5adeb59ff77c056|forum post f5adeb59ff77c056].

FossilOrigin-Name: cea8bf79e18d55a8658e48a967cd0b7970b6f88badb769cfbb1f66ab24fb9ec8

12 days agoIn the ieee754 extension, render -0.0 as 'ieee754(-1,-3071)' instead of
drh [Tue, 23 Sep 2025 16:01:45 +0000 (16:01 +0000)] 
In the ieee754 extension, render -0.0 as 'ieee754(-1,-3071)' instead of
'ieee754(1,-3071)' as that makes the sign clearer.  Both strings still
convert back to -0.0.  Note that negative zero
and positive zero are distinct values in ieee754.
[forum:/forumpost/1eab7e4a08|Forum post 1eab7e4a08].

FossilOrigin-Name: 136188c161a8a2d5166798fcbd341bd1d3f81da7291011f806d6b2153544832c

12 days agoAdd makefile target '64bit' to ext/wasm/GNUmakefile to build the 64-bit bundles....
stephan [Tue, 23 Sep 2025 02:04:07 +0000 (02:04 +0000)] 
Add makefile target '64bit' to ext/wasm/GNUmakefile to build the 64-bit bundles. It does not yet generate copies of the test apps to load/test them, pending other reworking of the build.

FossilOrigin-Name: 3e2ea990ad76f9e68d514568f53eaa692a1eb11695fceb1bcc58cea00605fff9

12 days agoSlight correction to the diagram in the previous checkin.
stephan [Tue, 23 Sep 2025 00:24:58 +0000 (00:24 +0000)] 
Slight correction to the diagram in the previous checkin.

FossilOrigin-Name: 6455af2703e78fb9b6df19cf4b46873d98ec91c3302dc0093a362d03ac48da91

12 days agoAdd a high-level diagram showing how sqlite3.js gets assembled.
stephan [Mon, 22 Sep 2025 23:48:05 +0000 (23:48 +0000)] 
Add a high-level diagram showing how sqlite3.js gets assembled.

FossilOrigin-Name: e0dfa1e62ba6d71abe1f48969eb6f53c83f2c28d47b996ee223587d923cc282f

13 days agoRefactor and simplify the JS API bootstrap steps.
stephan [Mon, 22 Sep 2025 21:04:24 +0000 (21:04 +0000)] 
Refactor and simplify the JS API bootstrap steps.

FossilOrigin-Name: a4f36fd93738f985d2c757c69eddca092732ce6148af98eb2595f9abe0d4fa44

13 days agoUpdate ext/wasm/api/README.md for recent changes.
stephan [Mon, 22 Sep 2025 18:05:10 +0000 (18:05 +0000)] 
Update ext/wasm/api/README.md for recent changes.

FossilOrigin-Name: 03b70686939e5f9ad984220a31674c23a1beb19f040c6327f24e23f0378555da

13 days agoCleanups and docs in the internal parts of the JS lib bootstrapping. More tinkering...
stephan [Mon, 22 Sep 2025 17:29:52 +0000 (17:29 +0000)] 
Cleanups and docs in the internal parts of the JS lib bootstrapping. More tinkering with the custom (but still disabled) wasm file loader.

FossilOrigin-Name: 35651d9ab5529da915500fc50ca3833a004d0b7a19d98e8fbf39234d94697aec

13 days agoRevise [a4430d262b3e129d] to preserve legacy behavior of the imposter
drh [Mon, 22 Sep 2025 17:28:08 +0000 (17:28 +0000)] 
Revise [a4430d262b3e129d] to preserve legacy behavior of the imposter
test-control.  The control argument must be 2 now to get read-only behavior.
The control argument of 1 goes back to the prior read/write behavior.

FossilOrigin-Name: 3e7ede2e6dc9ac8e746dafe0ecb5379044631e753e951f9ab97ec84addbd830a

13 days agoIn wasm.ptr.coerce(), treat the undefined value the same as 0 for Number-type pointer...
stephan [Mon, 22 Sep 2025 13:13:02 +0000 (13:13 +0000)] 
In wasm.ptr.coerce(), treat the undefined value the same as 0 for Number-type pointers for consistency with the BigInt coercion. The bindings have long treated both null and undefined as === 0 for pointer operations.

FossilOrigin-Name: ef73bb1ddae28c6a0b462a2a840bfaaec3fc70d843e9ab6c53097281ffc85a78

13 days agoMinor doc updates. No functional changes.
stephan [Mon, 22 Sep 2025 11:52:06 +0000 (11:52 +0000)] 
Minor doc updates. No functional changes.

FossilOrigin-Name: 9c67299b452a2b19b5f4285feb975b30864a9415ccf62b7c7ebb1587a6545b33

13 days agoRework the JS/WASM pieces for compatibility with both 32-bit and 64-bit WASM environm...
stephan [Mon, 22 Sep 2025 11:41:15 +0000 (11:41 +0000)] 
Rework the JS/WASM pieces for compatibility with both 32-bit and 64-bit WASM environments. This affects only the browser-side components, not the --with-wasi-sdk build nor the core library.

FossilOrigin-Name: 8ac367686fecd2e3ff1f4b4565e9f206a64237744e381704693df2e6efbe235a

13 days agoFix a problem with handling of 4-byte utf-8 characters in the shell tool (not the...
dan [Mon, 22 Sep 2025 10:48:10 +0000 (10:48 +0000)] 
Fix a problem with handling of 4-byte utf-8 characters in the shell tool (not the sqlite library). Forum post [forum:/forumpost/184b372388 | 184b372388].

FossilOrigin-Name: f3e845cf38fc364bfa3f8d433b668f884d11286c823d87ee0ed124a991c94e14

13 days agoExperimenting with a custom wasm loader, but don't enable it without an explicit... wasm-64bit
stephan [Mon, 22 Sep 2025 02:40:06 +0000 (02:40 +0000)] 
Experimenting with a custom wasm loader, but don't enable it without an explicit build flag. The goal here is to make the WebAssembly.Module object available internally (the default loader hides it from us).

FossilOrigin-Name: e5f0256feab95c30a8e3e1e69963fb3e25ed2da296aff5bc6646fe96a76c0b81

2 weeks agoMinor internal optimizations in the wasm glue.
stephan [Sun, 21 Sep 2025 23:15:12 +0000 (23:15 +0000)] 
Minor internal optimizations in the wasm glue.

FossilOrigin-Name: fb053a27d94f9caedfddf28680e13836343745376e84c8008641df6bb517cd8b

2 weeks agoA minor optimization in wasm.realloc().
stephan [Sun, 21 Sep 2025 22:17:13 +0000 (22:17 +0000)] 
A minor optimization in wasm.realloc().

FossilOrigin-Name: 6a070f450ac9ee3d4d6a3e05ef8fa2071a684181ea160805e236c3bba226510a

2 weeks agoRemove some stale makefile comments. Add a little widget to fiddle's toolbar which...
stephan [Sun, 21 Sep 2025 22:08:05 +0000 (22:08 +0000)] 
Remove some stale makefile comments. Add a little widget to fiddle's toolbar which shows whether it's running in 32- or 64-bit mode. Reduce fiddle's starting memory to 8MB.

FossilOrigin-Name: e99730f96e13f7497a871fdcc5eaa4187835f005a759f0fc79bbfe982f454437

2 weeks agoImprove db-close-time cleanup in the face of WASM environments which wrap wasm.export...
stephan [Sun, 21 Sep 2025 21:37:44 +0000 (21:37 +0000)] 
Improve db-close-time cleanup in the face of WASM environments which wrap wasm.exports in nullary wrappers.

FossilOrigin-Name: fbb63634eab83fda0090fe2c38bda735b497fd6e57dd36344559962e396dbb17

2 weeks agoFix a Number/BigInt descrepancy in oo1.DB() when passed a WASM-string db filename...
stephan [Sun, 21 Sep 2025 21:17:41 +0000 (21:17 +0000)] 
Fix a Number/BigInt descrepancy in oo1.DB() when passed a WASM-string db filename. Consolidate some duplicated internal code and adjacent minor cleanups.

FossilOrigin-Name: d078aff7817ccd4f891024e55703519307a53815d472086bf3d42b2be28698b3

2 weeks agoFix a StructType.dispose()/ondispose() memleak in Jaccwabyt bindings in 64-bit builds...
stephan [Sun, 21 Sep 2025 20:26:47 +0000 (20:26 +0000)] 
Fix a StructType.dispose()/ondispose() memleak in Jaccwabyt bindings in 64-bit builds and update its docs for 64-bit additions. Remove the parts of tester1.js related to skipping specific tests in 64-bit builds.

FossilOrigin-Name: 6baea1d719b0c345fee5f32a3917ce9c507a2d8cb029eaca675daca77f297eba

2 weeks agoGeneral cleanups and dead code removal.
stephan [Sun, 21 Sep 2025 19:39:06 +0000 (19:39 +0000)] 
General cleanups and dead code removal.

FossilOrigin-Name: 0336fa95e15c53ac6ab8152a840163a5aac64725874ffb848ce1d95e3af90586

2 weeks agoRemove some dead code and stray debug output. Fix (again) the JS SQLTester for 64...
stephan [Sun, 21 Sep 2025 19:01:15 +0000 (19:01 +0000)] 
Remove some dead code and stray debug output. Fix (again) the JS SQLTester for 64-bit (the previous build was set to 32-bit).

FossilOrigin-Name: a6b9567001dad0293dc6a7fe9a7ec1a220e41d9426448e2ab91dbd551948be15

2 weeks agoUpdate the JS SQLTester for recent sqlite3.wasm changes.
stephan [Sun, 21 Sep 2025 18:42:25 +0000 (18:42 +0000)] 
Update the JS SQLTester for recent sqlite3.wasm changes.

FossilOrigin-Name: 0fa1830540bcb86f5c59b1a6a9ffd8727c194a64a131d9d362023c84a3b820cb

2 weeks agoGeneric cleanups and simplifications in JS code.
stephan [Sun, 21 Sep 2025 17:55:23 +0000 (17:55 +0000)] 
Generic cleanups and simplifications in JS code.

FossilOrigin-Name: 074cf4e6c1775900204bb0d920111ee19601d5c63690e79e988e7fe6b040a647

2 weeks agoRename wasm config entry pointerSizeof to pointerSize for consistency with wasm.ptr...
stephan [Sun, 21 Sep 2025 14:25:29 +0000 (14:25 +0000)] 
Rename wasm config entry pointerSizeof to pointerSize for consistency with wasm.ptr.size.

FossilOrigin-Name: 2cd8ba740f9b14dc1408b62632c603076b070dc412bf7cbfb3b525f0c4912371

2 weeks agoRestructure the interface for the sqlite3.wasm pointer-size-dependent details.
stephan [Sun, 21 Sep 2025 13:53:59 +0000 (13:53 +0000)] 
Restructure the interface for the sqlite3.wasm pointer-size-dependent details.

FossilOrigin-Name: 8ac12e1f5144380d4ecc8b27a1f62dcda0e5a86409ae7149f62c33caeea19a23

2 weeks agoReduce sqlite3.js build size by about 30kb by stripping out Emscripten's makeInvalidE...
stephan [Sun, 21 Sep 2025 11:49:23 +0000 (11:49 +0000)] 
Reduce sqlite3.js build size by about 30kb by stripping out Emscripten's makeInvalidEarlyAccess() wrappers.

FossilOrigin-Name: a65bd978cbc646ec687ebcfc736a968e0597062251b2155caab42bca2d36f1e9

2 weeks agoReduce sqlite3.js build size by about 30kb by stripping out Emscripten's makeInvalidE...
stephan [Sun, 21 Sep 2025 11:47:06 +0000 (11:47 +0000)] 
Reduce sqlite3.js build size by about 30kb by stripping out Emscripten's makeInvalidEarlyAccess() wrappers.

FossilOrigin-Name: 9fafe075d6f4c49fca45963b142f3e0f0e60d79cb462b7e24f9ed0b9a9677f28

2 weeks agoRemove some dead code.
stephan [Sun, 21 Sep 2025 11:39:53 +0000 (11:39 +0000)] 
Remove some dead code.

FossilOrigin-Name: 1c2cd58d1a86d85e79ac912270e762e22f43f1d41d81a19ecd0ae6b2656c71b4

2 weeks agoMinor cleanup in sqlite3.wasm.ptrAdd().
stephan [Sun, 21 Sep 2025 11:15:00 +0000 (11:15 +0000)] 
Minor cleanup in sqlite3.wasm.ptrAdd().

FossilOrigin-Name: f659595d2e9e019a77d0c86803dbeb4bd728221a665825896ec29f7c0c0bdc65

2 weeks agoRemove some fiddle debug output.
stephan [Sun, 21 Sep 2025 01:03:16 +0000 (01:03 +0000)] 
Remove some fiddle debug output.

FossilOrigin-Name: c7cc374ff5ccd8b8f0a6cd0acada2a713626b5447cf014db12e18327fccfd36b

2 weeks agoResolve the non-functional 64-bit JS vtabs and VFSes. All wasm tests now pass on...
stephan [Sun, 21 Sep 2025 00:59:23 +0000 (00:59 +0000)] 
Resolve the non-functional 64-bit JS vtabs and VFSes. All wasm tests now pass on a 64-bit build. Investigation of the fiddle failure on a second db import is still pending.

FossilOrigin-Name: 7c44b48b628d3d93b13031e9fd08ed39fec35c661aca9e813a89348d6c415663

2 weeks agoDetermine the WASM environment's pointer size at runtime instead of baking it in...
stephan [Sat, 20 Sep 2025 23:21:24 +0000 (23:21 +0000)] 
Determine the WASM environment's pointer size at runtime instead of baking it in at build-time via the preprocessor.

FossilOrigin-Name: 21ac6aaa03517841b637924720354b9800d6e8b7bd5f6ee54a99f5f45b2ccdec

2 weeks agoAdd missing sqlite3_vtab::xIntegrity wasm mapping. Correct signatures for the (unused...
stephan [Sat, 20 Sep 2025 22:11:19 +0000 (22:11 +0000)] 
Add missing sqlite3_vtab::xIntegrity wasm mapping. Correct signatures for the (unused) xDlOpen and xDlError bindings. Disable OPFS-related tests in tester1.js in 64-bit builds.

FossilOrigin-Name: dccfa7098975d8c09eb6e7d30cd2ae30bc8234ef9a24f4a2ad5e9ffd29df72c2

2 weeks agoAdd missing sqlite3_vtab::xIntegrity wasm mapping. Correct signatures for the (unused...
stephan [Sat, 20 Sep 2025 22:10:59 +0000 (22:10 +0000)] 
Add missing sqlite3_vtab::xIntegrity wasm mapping. Correct signatures for the (unused) xDlOpen and xDlError bindings. Disable OPFS-related tests in tester1.js in 64-bit builds.

FossilOrigin-Name: a106be90a2dba7476e54dbb4bdf47d0999031dae0ca82d73e51a48dadd6bcdc0

2 weeks agoReinstate the working-again commit/rollback/update hook tests. The bug breaking those...
stephan [Sat, 20 Sep 2025 21:03:28 +0000 (21:03 +0000)] 
Reinstate the working-again commit/rollback/update hook tests. The bug breaking those was the one-letter change at the top of this diff.

FossilOrigin-Name: c582513a77cd1d1d9479e5a4518ddf15ef5a213bed1bfb6af9bd21bf3be41f8a

2 weeks agoFurther tweaks towards 64-bit wasm. Fiddle is failing intermittently from the C level...
stephan [Sat, 20 Sep 2025 20:23:59 +0000 (20:23 +0000)] 
Further tweaks towards 64-bit wasm. Fiddle is failing intermittently from the C level when importing a db and it's not yet clear what's happening there.

FossilOrigin-Name: 9fd82ebe31993c11e61a47205b7fc17a28283ec96cf278df1b6ea8a196d1fcb1

2 weeks agoGet speedtest1's wasm build working.
stephan [Sat, 20 Sep 2025 20:19:18 +0000 (20:19 +0000)] 
Get speedtest1's wasm build working.

FossilOrigin-Name: 2a61e3f1ccb1c2f115377d33af7d84d158b06c462e482fbbddf35c56d1fb58d8

2 weeks agoImprove deps handling of fiddle's gzipped output files to help avoid stale gz files...
stephan [Sat, 20 Sep 2025 20:17:17 +0000 (20:17 +0000)] 
Improve deps handling of fiddle's gzipped output files to help avoid stale gz files during development (althttpd will prefer those over the uncompressed ones). Only compress the larger files, not the small html/js pieces.

FossilOrigin-Name: bb945f52909caa2577de38711883a79ca918b3716e5e0c2fed6e6ef12e19aeef

2 weeks agoGet all but 3 of the tester1.js test groups running in 64-bit builds. The outliers...
stephan [Sat, 20 Sep 2025 18:51:10 +0000 (18:51 +0000)] 
Get all but 3 of the tester1.js test groups running in 64-bit builds. The outliers are virtual tables and commit/rollback/update hooks.

FossilOrigin-Name: c135d9743698b3331e56f72160e2b78840aa2c8fa1a70daea9d4a0952dbda186

2 weeks agoGet several hundred more lines of tester1.js running in 64-bit mode.
stephan [Sat, 20 Sep 2025 17:11:57 +0000 (17:11 +0000)] 
Get several hundred more lines of tester1.js running in 64-bit mode.

FossilOrigin-Name: f5105ee5defa042508a68a1f4e23b9fff46a1697b1a727e01c3edea3030fbcb5

2 weeks agoFurther work on 64-bit WASM builds. It now gets through just shy of half of tester1.js.
stephan [Sat, 20 Sep 2025 15:16:55 +0000 (15:16 +0000)] 
Further work on 64-bit WASM builds. It now gets through just shy of half of tester1.js.

FossilOrigin-Name: c8deed31365898e1379d577298fc80ef08a5531999d5b54a9f14337febed0260

2 weeks agoIf the file-system supports f2fs style atomic-writes, sync the directory after deleti...
dan [Sat, 20 Sep 2025 14:48:08 +0000 (14:48 +0000)] 
If the file-system supports f2fs style atomic-writes, sync the directory after deleting a journal file in journal_mode=DELETE mode in synchronous=NORMAL or synchronous=FULL modes (as well as synchronous=EXTRA).

FossilOrigin-Name: e24b21699644a5b49181f2e63961b6a3fccb85605d0b6d109a6043341c194d99

2 weeks agoFix the decimal_cmp() extension function to give correct results in
drh [Sat, 20 Sep 2025 14:32:12 +0000 (14:32 +0000)] 
Fix the decimal_cmp() extension function to give correct results in
corner cases such as negative zero and two equivalent values where one
has extra trailing zeros to the right of the decimal point.
[forum:/forumpost/367c770224|Forum post 367c770224].

FossilOrigin-Name: 25b3626a018fa5916d0e129ee057c3f709c6e4d0b84a1a3102cad127a39a3db9

2 weeks agoGet the wasm tests running in a 64-bit build up through (but not including) the oo1...
stephan [Sat, 20 Sep 2025 11:09:20 +0000 (11:09 +0000)] 
Get the wasm tests running in a 64-bit build up through (but not including) the oo1 bits.

FossilOrigin-Name: a5af46174a05e1414370884d1a99827af9286a60eff1c8ae1551e7fad3903f7a

2 weeks agoGet about 1/3rd of the tests running with MEMORY64=1, but the code noise level added...
stephan [Sat, 20 Sep 2025 03:02:36 +0000 (03:02 +0000)] 
Get about 1/3rd of the tests running with MEMORY64=1, but the code noise level added by the BigInt/Number discrepancy is making this very unattractive. There are apparently irreconcilable differences between MEMORY64=1 and 2, in that they have different argument type expectations for methods such as WebAssembly.Table.get(), where MEMORY64=1 requires a BigInt a MEMORY64=2 requires a Number. We have no way to make that distinction from the JS code, and don't know what other APIs are affected by that quirk.

FossilOrigin-Name: 1e3b003ff99d2788d93e179504b711cb78846605774bf472589440d0136f20fa

2 weeks agoBaby steps towards 64-bit pointers. Get it building and testing again in 32-bit builds.
stephan [Sat, 20 Sep 2025 00:43:47 +0000 (00:43 +0000)] 
Baby steps towards 64-bit pointers. Get it building and testing again in 32-bit builds.

FossilOrigin-Name: f35bb66e3eb939d321afb3545c184013633ce35fa4cbd67b6be17a64997ece9d

2 weeks agoInitial experimentation with a -sMEMORY64=1 wasm build (full 64-bit). This compiles...
stephan [Fri, 19 Sep 2025 23:21:00 +0000 (23:21 +0000)] 
Initial experimentation with a -sMEMORY64=1 wasm build (full 64-bit). This compiles but does not pass tests due to friction between BigInt and Number types (e.g. Number(null)===0 but BigInt(null) throws, many functions are fussy about which of those types they'll take, and we cannot simply mix and match the two types transparently (1n+1 is not legal (but 1n>=1 is), so we can no longer do pointer arithmatic without hoop-jumping)). The library bootstraps but it's failing early on in tests due to this friction.

FossilOrigin-Name: cfd5c746a6111f49c9c83a56c3ef65223456306f2de6e20b36b1ca0c98b593e9

2 weeks agoAdd some comments describing the ways in which building sqlite3.wasm with -sMEMORY64...
stephan [Fri, 19 Sep 2025 20:10:05 +0000 (20:10 +0000)] 
Add some comments describing the ways in which building sqlite3.wasm with -sMEMORY64=(non-zero) fails.

FossilOrigin-Name: 0b14fd35ca37075bb65b2ab398f3324dc851347b1c042566eac23724013653f8

2 weeks agoInitial build-side tweaks to pave the way for a 64-bit WASM build. Such a build does...
stephan [Fri, 19 Sep 2025 19:28:13 +0000 (19:28 +0000)] 
Initial build-side tweaks to pave the way for a 64-bit WASM build. Such a build does not yet work for reasons given in the makefile comments, but is an eventual goal.

FossilOrigin-Name: fe2e1681b6dac81508ab67d1247e1f92018c9998386789846d1715c2cc13d6a8

2 weeks agoImprove imposter tables: (1) Read-only unless writeable_schema=ON
drh [Fri, 19 Sep 2025 17:33:29 +0000 (17:33 +0000)] 
Improve imposter tables: (1) Read-only unless writeable_schema=ON
(2) --unsafe-testing no longer required (3) Does not interfere with
PRAGMA integrity_check.

FossilOrigin-Name: a4430d262b3e129d7f00be1661af563907d7b2e98560a9847cd399129f91247b

2 weeks agoDiverse cleanups and docs in the JS and kvvfs pieces. Functional changes: (A) ensure...
stephan [Fri, 19 Sep 2025 17:24:47 +0000 (17:24 +0000)] 
Diverse cleanups and docs in the JS and kvvfs pieces. Functional changes: (A) ensure that the 'i32' JS/WASM func arg/result conversion works properly with a 64-bit-memory WASM build (which we neither use nor test but [https://webassembly.org/news/2025-09-17-wasm-3.0/ | the newly-ratified WASM 3.0] brings within potential reach). (B) Fix sqlite3_js_posix_create_file() to not deallocate its input array if the client passes in raw memory (the library has never used it that way but the API permits it).

FossilOrigin-Name: 79af65a694fbbb3d501fb2ebd835c259ca644e0dafdd71eeb9f0a7c0e9128a1e

2 weeks agoImprovements to imposter tables: (1) They are read-only unless writable-schema imposter-tables
drh [Fri, 19 Sep 2025 17:24:12 +0000 (17:24 +0000)] 
Improvements to imposter tables:  (1) They are read-only unless writable-schema
is enabled.  (2) Because they are now read-only, the ".imposter" command
in the CLI no longer requires the --unsafe-testing command-line option.
(3) Imposter tables do not participate in a PRAGMA integrity_check and hence
do not cause false-positive errors.  However, you can still do an
integrity_check on the the imposter table itself by naming the imposter
table as the argument to integrity_check.

FossilOrigin-Name: ad152ddc4bcf6cfe840b9a36ab76a5ec36afdb1dd96eb7697e4b3df1bf63b00d

2 weeks agoWasm: (A) diverse internal doc updates. (B) when generating automated JS-to-WASM...
stephan [Fri, 19 Sep 2025 14:21:09 +0000 (14:21 +0000)] 
Wasm: (A) diverse internal doc updates. (B) when generating automated JS-to-WASM function proxies for converters which require an additional middle-man proxy, e.g. sqlite3_exec(), use the client-provided function, not the proxy function, as the cache key, to keep from re-generating the conversion in some common use patterns.

FossilOrigin-Name: 5e5139c2a162562cee0071d03954ebc0b8938da0b045ec3f5eba32dc8e19604d

2 weeks agoFix typo in the name of the CursorHints optimization in the CLI.
drh [Fri, 19 Sep 2025 09:18:22 +0000 (09:18 +0000)] 
Fix typo in the name of the CursorHints optimization in the CLI.

FossilOrigin-Name: 468a11fd415710042b23880772f6c2c7771008208823fe3b554227a9244dbf92

2 weeks agoFix a harmless compiler warning.
drh [Fri, 19 Sep 2025 01:17:44 +0000 (01:17 +0000)] 
Fix a harmless compiler warning.

FossilOrigin-Name: 42c225a2ed7fc95f9b01467c64ba2bf97bca216fdcd6ab1ba3fb49c068650de9

2 weeks agoFix the new walckptnoop.test test module so that it works in various
drh [Thu, 18 Sep 2025 23:23:50 +0000 (23:23 +0000)] 
Fix the new walckptnoop.test test module so that it works in various
alignments.

FossilOrigin-Name: 08689dacc1237a2b90dff4d32186b28054214f709dbff9e07057d3175c1c423a

2 weeks agoTry to make the carray extension easier to compile on VxWorks.
drh [Thu, 18 Sep 2025 19:59:56 +0000 (19:59 +0000)] 
Try to make the carray extension easier to compile on VxWorks.

FossilOrigin-Name: 1a34c3f49ec48b551098f6781a3a6355aa3c9fd47fd9ebaef01f254b1dcafc9d

2 weeks agoFix harmless compiler warning in the CLI.
drh [Thu, 18 Sep 2025 16:48:37 +0000 (16:48 +0000)] 
Fix harmless compiler warning in the CLI.
[forum:/forumpost/ffdcdaba19|Forum post ffdcdaba19].

FossilOrigin-Name: 1626b6082d06c6fd66ff0a6d9fb3641c936ee8db326275e4fddfecf172c5a6eb

2 weeks agoImprove the quote-stripping when importing a db into fiddle, as reported in [forum...
stephan [Wed, 17 Sep 2025 20:05:12 +0000 (20:05 +0000)] 
Improve the quote-stripping when importing a db into fiddle, as reported in [forum:264050a3f3 | forum post 264050a3f3].

FossilOrigin-Name: 1a87c16fddf174380deba9bbe58079328baf9f9ca95210f63bc628e3ef3eeb26

2 weeks agoRemove newly unreachable code in the solver of the query planner.
drh [Wed, 17 Sep 2025 17:09:07 +0000 (17:09 +0000)] 
Remove newly unreachable code in the solver of the query planner.

FossilOrigin-Name: 9abaa0ac2b3049341f36ff683ff6eebb589698bd910624aa24f11398d557b3c2

2 weeks agoIn the date/time functions, a timezone suffix of "+00:00" should work
drh [Wed, 17 Sep 2025 14:55:47 +0000 (14:55 +0000)] 
In the date/time functions, a timezone suffix of "+00:00" should work
the same as "Z".
[forum:/forumpost/2025-09-17T10:12:14z|Forum post 2025-09-17T10:12:14z].

FossilOrigin-Name: 3b7a5babf0843c4b3ce93d26f1447218585ce645ec3acd942ac649204e16675a

2 weeks agoIf the file-system supports f2fs style atomic-writes, sync the directory after deleti... atomic-write-fix
dan [Tue, 16 Sep 2025 19:52:12 +0000 (19:52 +0000)] 
If the file-system supports f2fs style atomic-writes, sync the directory after deleting a journal file in journal_mode=DELETE mode in synchronous=NORMAL or synchronous=FULL modes (as well as synchronous=EXTRA).

FossilOrigin-Name: c1e37cb70a8e93368c19ba0fdb987f0616abac028e3541d793a4e6f005b0e513

2 weeks agoUpdates to where.c to handle vtabs in joins more similarly to regular tables.
dan [Mon, 15 Sep 2025 17:06:35 +0000 (17:06 +0000)] 
Updates to where.c to handle vtabs in joins more similarly to regular tables.

FossilOrigin-Name: 9138223013505d3e0f1f2b40b51d521184aabd50732fdf4f6bed393cfa9475fc

2 weeks agoMerge latest trunk with this branch. vtab-planner-fixes
dan [Mon, 15 Sep 2025 16:09:54 +0000 (16:09 +0000)] 
Merge latest trunk with this branch.

FossilOrigin-Name: 0bb8c42951ed4fcda60f195b9cc84c80d5b8c0ff77c7517243708f43ba09cfdd

2 weeks agoDiverse internal cleanups in the JS/WASM pieces. A potential fix for a hypothetical...
stephan [Mon, 15 Sep 2025 14:11:55 +0000 (14:11 +0000)] 
Diverse internal cleanups in the JS/WASM pieces. A potential fix for a hypothetical db-close-time resource leak of a subset of automated JS-to-WASM function conversions in Safari. That browser exposes WASM-exported functions via nullary wrappers, which causes a handful of them to misbehave (not clean up) at sqlite3_close_v2()-time.

FossilOrigin-Name: fabbc8b6d184d52a513e80fabd900f578424fc8a8055e3d64fac54b9e28ea18a

3 weeks agoExpose sqlite3_set_errmsg() to the JNI bindings.
stephan [Sun, 14 Sep 2025 12:55:57 +0000 (12:55 +0000)] 
Expose sqlite3_set_errmsg() to the JNI bindings.

FossilOrigin-Name: 292866a46948e8d707bd14864fd1b40eec1bd2e22dcd249ec94711b646c8a70b

3 weeks agoExpose the new sqlite3_set_errmsg() to wasm. Refactor JS's sqlite3__wasm_db_error...
stephan [Sun, 14 Sep 2025 12:14:42 +0000 (12:14 +0000)] 
Expose the new sqlite3_set_errmsg() to wasm. Refactor JS's sqlite3__wasm_db_error() to wrap that instead of the WASM-specific routine which previously did that job. This resolves the TODO added in [ead8a3a94e].

FossilOrigin-Name: e447a50f3a3791c264a68000948daa64edb1857d51d256fbd1ff0f2c2b330d5e

3 weeks agoUpdates to where.c to handle vtabs in joins more similarly to regular tables.
dan [Sat, 13 Sep 2025 19:23:12 +0000 (19:23 +0000)] 
Updates to where.c to handle vtabs in joins more similarly to regular tables.

FossilOrigin-Name: 991383262b0d07ebc79fdb6bed448013cea3a0ac13292d5397dce012b1e6a673

3 weeks agoInitialize the sqlite3_set_errmsg entry on the loadable extension thunk.
drh [Sat, 13 Sep 2025 18:28:34 +0000 (18:28 +0000)] 
Initialize the sqlite3_set_errmsg entry on the loadable extension thunk.
Also fix a harmless compiler warning in sqlite_dbpage.

FossilOrigin-Name: 031a43ae2bb06adefb3f66bf7d1cdae0020b25a1eeee7c3a3dd4447014b9d3f7

3 weeks agoAdd --enable-dbstat and --enable-dbpage options to configure. Fix the
drh [Sat, 13 Sep 2025 18:15:26 +0000 (18:15 +0000)] 
Add --enable-dbstat and --enable-dbpage options to configure.  Fix the
".dbtotxt" command in the CLI so that it uses the correct filename of
the database it is rendering as text.

FossilOrigin-Name: e04e6e681891020f78237fa6dc11bc2e2022c569b04ac96cb333bf59f1662cd1

3 weeks agoEnhance the integerValue() routine in the CLI so that when its text input
drh [Sat, 13 Sep 2025 17:53:14 +0000 (17:53 +0000)] 
Enhance the integerValue() routine in the CLI so that when its text input
specifies an out-of-range integer, the routine returns the nearest integer
that is representable as 64-bit twos-complement.

FossilOrigin-Name: 5d50279fcb66b479e76586b729f36d389b28940476ff70d61b0066a5d5d3ad0c

3 weeks agoAdd a TODO regarding replacing the internal sqlite3__wasm_db_error() with the new...
stephan [Fri, 12 Sep 2025 17:36:23 +0000 (17:36 +0000)] 
Add a TODO regarding replacing the internal sqlite3__wasm_db_error() with the new [34eda113c8819d | sqlite3_set_errmsg()], which serves the same role.

FossilOrigin-Name: ead8a3a94e0f349bcdced6a62af0349b0b7b731137c8d33e2ef0e7eecd107c1f

3 weeks agoAdd sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to return any error...
dan [Fri, 12 Sep 2025 17:13:59 +0000 (17:13 +0000)] 
Add sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to return any error code and error message via the SQLite handle.

FossilOrigin-Name: e34eda113c8819df46c139ccf749b686c8bfdd399f59345c6d6be3736bdf97cb

3 weeks agoTypo fixes. Make sqlite3_set_errmsg() accessible to run-time loadable sqlite3-set-errmsg
drh [Fri, 12 Sep 2025 15:31:33 +0000 (15:31 +0000)] 
Typo fixes.  Make sqlite3_set_errmsg() accessible to run-time loadable
extensions.

FossilOrigin-Name: 93a41e31322eec70476f7d81f4af7fb8476cad21a56d6b1048a9e0c0c440bf72

3 weeks agoAdd more details to comments in the previous check-in.
drh [Fri, 12 Sep 2025 15:20:39 +0000 (15:20 +0000)] 
Add more details to comments in the previous check-in.

FossilOrigin-Name: ed36b3aa4b68c6bb347b6851ea61bcad9712c4a9ed39e3fb4f84cb9b9ee48dc2

3 weeks agoAdd experimental API sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to...
dan [Fri, 12 Sep 2025 15:02:47 +0000 (15:02 +0000)] 
Add experimental API sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to return any error code and error message via the SQLite handle.

FossilOrigin-Name: 4d5b60a1e57448f03af2a657fe7cdabb04ebaf9688d5cc700dd8f9892a5cba15

3 weeks agoFix an off-by-one error in sqlite3_rsync.
drh [Thu, 11 Sep 2025 10:58:49 +0000 (10:58 +0000)] 
Fix an off-by-one error in sqlite3_rsync.
[forum:/info/46753431d4|Forum post 46753431d4].

FossilOrigin-Name: ef3b7be6f2037871f6f1b1944fed3dda28216e7f179080d3be2e2620c031f48c

3 weeks agoImproved support for VxWorks.
drh [Thu, 11 Sep 2025 10:43:57 +0000 (10:43 +0000)] 
Improved support for VxWorks.

FossilOrigin-Name: 5bc6b9352236df3091ee69b947d0c397264156539d13e5968ec3b9a6e55dc800

3 weeks agoFix a harmless compiler warning in the CLI. Gcc generates identical
drh [Thu, 11 Sep 2025 10:37:01 +0000 (10:37 +0000)] 
Fix a harmless compiler warning in the CLI.  Gcc generates identical
machine code before and after this change.
[forum:/forumpost/8bda0d896f|Forum post 8bda0d896f].

FossilOrigin-Name: dbca4fe34467653d083de42d0c75746cf171e96ee3867abe67a47ab88437fa71

3 weeks agoLatest upstream autosetup, with project-local s/--debug/--autodebug-debug/ patch...
stephan [Thu, 11 Sep 2025 10:14:10 +0000 (10:14 +0000)] 
Latest upstream autosetup, with project-local s/--debug/--autodebug-debug/ patch, for HP-UX-specific config bootstrapping code and latest jimsh.

FossilOrigin-Name: 1d2352a16cc0990037710b4a666f2f3b039c1973e0af29990d67d70bcdba0600

3 weeks agoConfigure script portability improvements for HP-UX builds, with the help of HP-UX...
stephan [Thu, 11 Sep 2025 10:09:43 +0000 (10:09 +0000)] 
Configure script portability improvements for HP-UX builds, with the help of HP-UX sysadmin Michael Osipov.

FossilOrigin-Name: 93cf2afa8ca529784f859da2f015bce3a251b23dafa6ca3d1db644a91969e237

3 weeks agoIn mkautoconfamal.sh use $MAKE if it's set so that it can be made to work on platform...
stephan [Thu, 11 Sep 2025 10:08:19 +0000 (10:08 +0000)] 
In mkautoconfamal.sh use $MAKE if it's set so that it can be made to work on platforms where 'make' from the PATH is not usable, e.g. HP-UX's standard make. This means that 'make snapshot-tarball' will inherit that value from the outer makefile and set it appropriate when the in-use make is named gmake.

FossilOrigin-Name: a8635cae05d2bce28d0c0c39b599cf8ca6f3b89b114fbeef519a8024692180c5

3 weeks agoMinor #ifdef changes to the carray.c extension so that the source file can
drh [Wed, 10 Sep 2025 20:28:57 +0000 (20:28 +0000)] 
Minor #ifdef changes to the carray.c extension so that the source file can
be more easily imported into a larger program (such as TH3).

FossilOrigin-Name: f16fd1afbb65f88d7b94c2488ddd59549d71894ab5fcee46b4c55bfe646bfc9d

3 weeks agoUse a separate mutex (SQLITE_MUTEX_STATIC_VFS2) for the VxWorks file list vxworks
drh [Wed, 10 Sep 2025 18:34:09 +0000 (18:34 +0000)] 
Use a separate mutex (SQLITE_MUTEX_STATIC_VFS2) for the VxWorks file list
in os_unix.c.

FossilOrigin-Name: 8f45f1a9d9208fbf124c4087092718b83cd653126bc1ed5f388e3577561f615b

3 weeks agoChange the order of some paragraphs within documentation comments in sqlite3session.h.
dan [Wed, 10 Sep 2025 16:57:57 +0000 (16:57 +0000)] 
Change the order of some paragraphs within documentation comments in sqlite3session.h.

FossilOrigin-Name: f0102d7b25d854b5a937eb7de5e25f52c2ecf904234857c96bd1995f5dde0b66

3 weeks agoThe GetSystemTimePreciseAsFileTime() API does not exist on 32-bit windows.
drh [Wed, 10 Sep 2025 14:28:07 +0000 (14:28 +0000)] 
The GetSystemTimePreciseAsFileTime() API does not exist on 32-bit windows.
Adjust [c5dbe93114d318fe] so that it works with this limitation.

FossilOrigin-Name: 61d9e204c5801a94811fdb0afe2c04f9814e08f2e141afa6dbda0fa45f026f70

3 weeks agoIf open files in VxWorks, do not unlink the file unless the file was marked
drh [Tue, 9 Sep 2025 19:00:55 +0000 (19:00 +0000)] 
If open files in VxWorks, do not unlink the file unless the file was marked
as delete-on-close.

FossilOrigin-Name: bb6114dbbf3bfbea57cd9be21666299663e94576b0175f6aeefd1d0f7107398e

3 weeks agoDo not allow attempts to open files in VxWorks unless the full pathname is
drh [Tue, 9 Sep 2025 17:39:28 +0000 (17:39 +0000)] 
Do not allow attempts to open files in VxWorks unless the full pathname is
provided.

FossilOrigin-Name: 4720205249214c01f6e63738e4927c0f53c853346cc2dfa45522aaa469f4d702

3 weeks agoDo not allow the local_getline() function in the CLI to allocate more
drh [Tue, 9 Sep 2025 10:28:06 +0000 (10:28 +0000)] 
Do not allow the local_getline() function in the CLI to allocate more
memory than can be counted using a 32-bit integer, thus limiting the
length of an input line to about one gigabyte.
[forum:/forumpost/c83b9affa2|Forum post c83b9affa2].

FossilOrigin-Name: 0f31711591c56f3896fb6f092752fb82c4ea646bf8e5838dfbe55302994ea091