Commit Graph

  • 91b1b0de2b Start reworking the wasm build (again) with an eye towards simplifying it. Currently only the canonical and esm builds work, not fiddle, speedtest, nor the bundler stuff. stephan 2025-09-23 05:10:19 +00:00
  • 12f17d41f9 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. stephan 2025-09-23 02:04:07 +00:00
  • a8bddde325 Slight correction to the diagram in the previous checkin. stephan 2025-09-23 00:24:58 +00:00
  • b19c14742d Add a high-level diagram showing how sqlite3.js gets assembled. stephan 2025-09-22 23:48:05 +00:00
  • e55a29f5fd Refactor and simplify the JS API bootstrap steps. stephan 2025-09-22 21:04:24 +00:00
  • 98f976b21d Increment the patch level to 3.50.6. drh 2025-09-22 18:50:24 +00:00
  • 4fca449c68 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). drh 2025-09-22 18:24:37 +00:00
  • cfa48c17f7 Update ext/wasm/api/README.md for recent changes. stephan 2025-09-22 18:05:10 +00:00
  • 1ab3d7eafd Cleanups and docs in the internal parts of the JS lib bootstrapping. More tinkering with the custom (but still disabled) wasm file loader. stephan 2025-09-22 17:29:52 +00:00
  • 6ba22a75f3 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. drh 2025-09-22 17:28:08 +00:00
  • 2ea861a245 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. stephan 2025-09-22 13:13:02 +00:00
  • 34d92f4ac6 Minor doc updates. No functional changes. stephan 2025-09-22 11:52:06 +00:00
  • 8eefa2725b 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. stephan 2025-09-22 11:41:15 +00:00
  • 65551b5456 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]. dan 2025-09-22 10:48:10 +00:00
  • 5a2e3c4af2 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). wasm-64bit stephan 2025-09-22 02:40:06 +00:00
  • 1d49644650 Minor internal optimizations in the wasm glue. stephan 2025-09-21 23:15:12 +00:00
  • 1e01174ac3 A minor optimization in wasm.realloc(). stephan 2025-09-21 22:17:13 +00:00
  • 60633a852d 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. stephan 2025-09-21 22:08:05 +00:00
  • 589855f40e Improve db-close-time cleanup in the face of WASM environments which wrap wasm.exports in nullary wrappers. stephan 2025-09-21 21:37:44 +00:00
  • e6db55f0e2 Fix a Number/BigInt descrepancy in oo1.DB() when passed a WASM-string db filename. Consolidate some duplicated internal code and adjacent minor cleanups. stephan 2025-09-21 21:17:41 +00:00
  • 50815f8ba4 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. stephan 2025-09-21 20:26:47 +00:00
  • b10548a7b0 General cleanups and dead code removal. stephan 2025-09-21 19:39:06 +00:00
  • cf0f11ac18 Remove some dead code and stray debug output. Fix (again) the JS SQLTester for 64-bit (the previous build was set to 32-bit). stephan 2025-09-21 19:01:15 +00:00
  • 334b15d8fc Update the JS SQLTester for recent sqlite3.wasm changes. stephan 2025-09-21 18:42:25 +00:00
  • 5b71447e8e Generic cleanups and simplifications in JS code. stephan 2025-09-21 17:55:23 +00:00
  • 128ae8ea3f Rename wasm config entry pointerSizeof to pointerSize for consistency with wasm.ptr.size. stephan 2025-09-21 14:25:29 +00:00
  • 1e2156e926 Restructure the interface for the sqlite3.wasm pointer-size-dependent details. stephan 2025-09-21 13:53:59 +00:00
  • d97c59e2bc Reduce sqlite3.js build size by about 30kb by stripping out Emscripten's makeInvalidEarlyAccess() wrappers. stephan 2025-09-21 11:49:23 +00:00
  • 72d81265ab Reduce sqlite3.js build size by about 30kb by stripping out Emscripten's makeInvalidEarlyAccess() wrappers. stephan 2025-09-21 11:47:06 +00:00
  • 23203a407e Remove some dead code. stephan 2025-09-21 11:39:53 +00:00
  • ba6527af04 Minor cleanup in sqlite3.wasm.ptrAdd(). stephan 2025-09-21 11:15:00 +00:00
  • f568a2f1bf Remove some fiddle debug output. stephan 2025-09-21 01:03:16 +00:00
  • 51127416a4 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. stephan 2025-09-21 00:59:23 +00:00
  • d1b64404b3 Determine the WASM environment's pointer size at runtime instead of baking it in at build-time via the preprocessor. stephan 2025-09-20 23:21:24 +00:00
  • 2674a4fdcb 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. stephan 2025-09-20 22:11:19 +00:00
  • 3e205eff8e 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. stephan 2025-09-20 22:10:59 +00:00
  • 25e416dc3a Reinstate the working-again commit/rollback/update hook tests. The bug breaking those was the one-letter change at the top of this diff. stephan 2025-09-20 21:03:28 +00:00
  • 7462b3749a 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. stephan 2025-09-20 20:23:59 +00:00
  • 043136276a Get speedtest1's wasm build working. stephan 2025-09-20 20:19:18 +00:00
  • 93cd069fdf 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. stephan 2025-09-20 20:17:17 +00:00
  • 832dfd97d1 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. stephan 2025-09-20 18:51:10 +00:00
  • a8756afdbc Get several hundred more lines of tester1.js running in 64-bit mode. stephan 2025-09-20 17:11:57 +00:00
  • a2daecfc8c Further work on 64-bit WASM builds. It now gets through just shy of half of tester1.js. stephan 2025-09-20 15:16:55 +00:00
  • cbefdaad9e 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). dan 2025-09-20 14:48:08 +00:00
  • 65a445d750 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]. drh 2025-09-20 14:32:12 +00:00
  • bd5d297fec Get the wasm tests running in a 64-bit build up through (but not including) the oo1 bits. stephan 2025-09-20 11:09:20 +00:00
  • 3653b14ea2 Fix the build for testfixture. Fix the walckptnoop.test script. drh 2025-09-20 10:34:44 +00:00
  • 6e3552e5e1 Merge all the latest trunk enhancements into the begin-concurrent branch. After this merge, there are some errors in the new walckptnoop.test module, which need to be fixed by a follow-on patch. drh 2025-09-20 10:14:56 +00:00
  • 22f9ca64db 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. stephan 2025-09-20 03:02:36 +00:00
  • 6a03f2029b Baby steps towards 64-bit pointers. Get it building and testing again in 32-bit builds. stephan 2025-09-20 00:43:47 +00:00
  • d6403a2d2e 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. stephan 2025-09-19 23:21:00 +00:00
  • 78202b9a3b Add some comments describing the ways in which building sqlite3.wasm with -sMEMORY64=(non-zero) fails. stephan 2025-09-19 20:10:05 +00:00
  • a09a8ffa62 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. stephan 2025-09-19 19:28:13 +00:00
  • cd82e75379 Merge the latest trunk enhancement into the reuse-schema branch. drh 2025-09-19 18:47:40 +00:00
  • fc0c05aa82 Merge latest changes to wal2 into this branch. dan 2025-09-19 18:01:33 +00:00
  • 79640bb5dc Merge latest trunk changes into this branch. dan 2025-09-19 17:53:53 +00:00
  • 723e8c88fa Improve imposter tables: (1) Read-only unless writeable_schema=ON (2) --unsafe-testing no longer required (3) Does not interfere with PRAGMA integrity_check. drh 2025-09-19 17:33:29 +00:00
  • d4cc844a2b 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). stephan 2025-09-19 17:24:47 +00:00
  • 49a37f333a 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. imposter-tables drh 2025-09-19 17:24:12 +00:00
  • 194d6edeb6 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. stephan 2025-09-19 14:21:09 +00:00
  • e7fe1d3b3e Fix typo in the name of the CursorHints optimization in the CLI. drh 2025-09-19 09:18:22 +00:00
  • f5dc671a57 Fix a harmless compiler warning. drh 2025-09-19 01:17:44 +00:00
  • e7efe1e201 Fix the new walckptnoop.test test module so that it works in various alignments. drh 2025-09-18 23:23:50 +00:00
  • 8f5503861f Try to make the carray extension easier to compile on VxWorks. drh 2025-09-18 19:59:56 +00:00
  • 7cbfa5b0d1 Include I/O consumed by ephermeral cursors in the SQLITE_DBSTATUS_SPILL values. Still need to add sorter. drh 2025-09-18 18:56:55 +00:00
  • 3312564540 Fix harmless compiler warning in the CLI. [forum:/forumpost/ffdcdaba19|Forum post ffdcdaba19]. drh 2025-09-18 16:48:37 +00:00
  • 16eedfbdda Initial implementation of SQLITE_DBSTATUS_SPILL. Does not yet take into account sorters or transient tables. drh 2025-09-18 14:51:23 +00:00
  • 9290d70466 Improve the quote-stripping when importing a db into fiddle, as reported in [forum:264050a3f3 | forum post 264050a3f3]. stephan 2025-09-17 20:05:12 +00:00
  • 3e17953beb Add the sqlite3_db_status64() interface. db-status64 drh 2025-09-17 19:19:52 +00:00
  • ac28cc30c0 Remove newly unreachable code in the solver of the query planner. drh 2025-09-17 17:09:07 +00:00
  • 12ed2fea03 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]. drh 2025-09-17 14:55:47 +00:00
  • a12c1dcca6 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). atomic-write-fix dan 2025-09-16 19:52:12 +00:00
  • 48790b48a7 Updates to where.c to handle vtabs in joins more similarly to regular tables. dan 2025-09-15 17:06:35 +00:00
  • e924087d30 Merge latest trunk with this branch. vtab-planner-fixes dan 2025-09-15 16:09:54 +00:00
  • c35f07ec2f 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. stephan 2025-09-15 14:11:55 +00:00
  • 36595d0630 Expose sqlite3_set_errmsg() to the JNI bindings. stephan 2025-09-14 12:55:57 +00:00
  • 6b8d7ac599 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]. stephan 2025-09-14 12:14:42 +00:00
  • 0247e15f69 Updates to where.c to handle vtabs in joins more similarly to regular tables. dan 2025-09-13 19:23:12 +00:00
  • c7cb05813c Initialize the sqlite3_set_errmsg entry on the loadable extension thunk. Also fix a harmless compiler warning in sqlite_dbpage. drh 2025-09-13 18:28:34 +00:00
  • 419b93adbf 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. drh 2025-09-13 18:15:26 +00:00
  • 96455af950 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. drh 2025-09-13 17:53:14 +00:00
  • a248d84fbe Add a TODO regarding replacing the internal sqlite3__wasm_db_error() with the new [34eda113c8819d | sqlite3_set_errmsg()], which serves the same role. stephan 2025-09-12 17:36:23 +00:00
  • 2c4008fe26 Add sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to return any error code and error message via the SQLite handle. dan 2025-09-12 17:13:59 +00:00
  • 195956af94 Typo fixes. Make sqlite3_set_errmsg() accessible to run-time loadable extensions. sqlite3-set-errmsg drh 2025-09-12 15:31:33 +00:00
  • 28a7f01f90 Add more details to comments in the previous check-in. drh 2025-09-12 15:20:39 +00:00
  • d968525382 Add experimental API sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to return any error code and error message via the SQLite handle. dan 2025-09-12 15:02:47 +00:00
  • eb8089ef46 Fix an off-by-one error in sqlite3_rsync. [forum:/info/46753431d4|Forum post 46753431d4]. drh 2025-09-11 10:58:49 +00:00
  • 9455a6e8b8 Improved support for VxWorks. drh 2025-09-11 10:43:57 +00:00
  • 56d831e064 Fix a harmless compiler warning in the CLI. Gcc generates identical machine code before and after this change. [forum:/forumpost/8bda0d896f|Forum post 8bda0d896f]. drh 2025-09-11 10:37:01 +00:00
  • 7754f53045 Latest upstream autosetup, with project-local s/--debug/--autodebug-debug/ patch, for HP-UX-specific config bootstrapping code and latest jimsh. stephan 2025-09-11 10:14:10 +00:00
  • 4619855103 Configure script portability improvements for HP-UX builds, with the help of HP-UX sysadmin Michael Osipov. stephan 2025-09-11 10:09:43 +00:00
  • be4cf645a8 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. stephan 2025-09-11 10:08:19 +00:00
  • 065daf24b4 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). drh 2025-09-10 20:28:57 +00:00
  • 0b8e4294d5 Use a separate mutex (SQLITE_MUTEX_STATIC_VFS2) for the VxWorks file list in os_unix.c. vxworks drh 2025-09-10 18:34:09 +00:00
  • d61dbf7072 Change the order of some paragraphs within documentation comments in sqlite3session.h. dan 2025-09-10 16:57:57 +00:00
  • 586361fa7c The GetSystemTimePreciseAsFileTime() API does not exist on 32-bit windows. Adjust [c5dbe93114d318fe] so that it works with this limitation. drh 2025-09-10 14:28:07 +00:00
  • e7f190b8e1 If open files in VxWorks, do not unlink the file unless the file was marked as delete-on-close. drh 2025-09-09 19:00:55 +00:00
  • 130a2f52b1 Do not allow attempts to open files in VxWorks unless the full pathname is provided. drh 2025-09-09 17:39:28 +00:00
  • 92f91ca37d 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]. drh 2025-09-09 10:28:06 +00:00
  • 4edee00ee0 Fix a potential memory leak in the VxWorks VFS that can occur following an OOM or I/O error during xOpen(). drh 2025-09-08 19:56:14 +00:00