Commit Graph

  • 12572f73d5 Consistently use IsSpace()/IsDigit() instead of isspace()/isdigit() in shell.c.in to squelch warnings on Cygwin. From Jan Nijtmans. stephan 2025-11-26 13:24:10 +00:00
  • ecd330f59d Fix the sha1() extension function so that it returns actual TEXT instead of a BLOB containing the UTF-8 TEXT. [forum:/forumpost/d15eefea7c|Forum post d15eefea7c] drh 2025-11-26 11:19:11 +00:00
  • 059b8d9c04 Tweak testrunner.tcl to allow it to use more cores. drh 2025-11-26 00:41:20 +00:00
  • d1b133cd16 When "testrunner.tcl status -d N" is run but the test database is not yet available, it enters a wait loop until the testing begins. drh 2025-11-25 23:59:31 +00:00
  • 74a04f9d96 Fix typo in the MAKE.BAT drh 2025-11-25 22:50:39 +00:00
  • 0455b793f6 Add two new makefile targets, "errors" and "status", for checking on testrunner errors and for running testrunner status -d 2, respectively. Add a simple make.bat script at the top level that runs nmake for us, and thus make the command-line to test on Windows identical to Unix. drh 2025-11-25 22:38:07 +00:00
  • 6003505a39 Cherry-pick JS fixes/cleanups/docs from [206275292217], [256c1dd2c367], and [dec0c6073cc1] from the kvvfs-v2 branch into trunk. stephan 2025-11-25 19:29:23 +00:00
  • f37923e723 Guard access to a piece of Emscripten-related scaffolding so that sqlite3-api.js does not hit it when imported into other builds. Reported in [forum:6eacbb9c447a5665|forum post 6eacbb9c447a5665]. stephan 2025-11-25 19:20:15 +00:00
  • 1da8e7ac4f Remove some debug output. stephan 2025-11-25 19:06:05 +00:00
  • 20e1f8a289 Remove the ostensible support for empty kvvfs names, as those names apparently never reach kvvfs.xOpen (the empty name is special). That actually simplifies things with regards to backwards compatibility. stephan 2025-11-25 19:05:13 +00:00
  • f0ca498c61 Improve kvvfs file name validation. Add sqlite3.kvvfs.unlink(). stephan 2025-11-25 18:52:08 +00:00
  • 6ef15842cd Fix subtle inaccuracies in qrfWrapLine(). Omit an unused variable from shell.c.in. drh 2025-11-25 18:20:33 +00:00
  • e62055f274 Add the sqlite3.kvvfs namespace for the new kvvfs APIs instead of adding more sqlite3_js_kvvfs_...() methods. Reinstate that clearing kvvfs storage is illegal when db handles are opened, solely for sanity's sake (they can actually recover from that but supporting such use feels ill-advised). stephan 2025-11-25 16:41:56 +00:00
  • 27aec2d1c1 Add an explicit rollback test for kvvfs. stephan 2025-11-25 16:07:05 +00:00
  • 30f9c25d9a A more compact formulation of [ac8af73c16ab821] which uncovered two remaining direct calls to kvrecordRead(), now replaced with calls through the thunk. Fix a typo which caused the storage object name to not be passed on to event listener. stephan 2025-11-25 15:59:58 +00:00
  • a63538027c In wasm builds, #if out the impls for the 3 core kvvfs i/o routines which get overwritten from JS (and thus aren't used) to reduce dependencies on POSIX APIs. stephan 2025-11-25 15:35:53 +00:00
  • 0e2d839f0e Fix a typo in fts3/4 debugging code allowing 'maxpendinXY' to act as a synonym for 'maxpending=' in special INSERT statements. dan 2025-11-25 15:11:34 +00:00
  • 011c261472 Work around an incorrect compiler warning on Mac. drh 2025-11-25 13:58:36 +00:00
  • 993b38f0f3 Fixes to .mode in the CLI. "qbox" sets the correct null value. The "--quote on" option sets the null value to NULL. drh 2025-11-25 12:16:56 +00:00
  • b24048ddce Omit the unused bTextNull flag from the QRF spec object. drh 2025-11-25 10:53:39 +00:00
  • 68230ef670 kvvfs internal cleanups. Experimentally add async event listeners to kvvfs to explore backing up a kvvfs a page at a time. stephan 2025-11-25 05:44:03 +00:00
  • 76dc170938 Factor out some now-superfluous JS-side kvvfs code. Factor out a superfluous allocation. Shorten the public API names of the new methods. stephan 2025-11-25 04:07:50 +00:00
  • c14460f466 Disallow a filename of '-journal' for db files in kvvfs, as that name has a special meaning there. stephan 2025-11-25 03:09:45 +00:00
  • d3a0fc5473 Add xGetLastError() to kvvfs but it does not appear to be called for xOpen() failures. stephan 2025-11-25 02:08:49 +00:00
  • 45d8831cad Fix a 32-/64-bit incompatibility in opfs-sahpool. stephan 2025-11-25 02:08:11 +00:00
  • c42259c2bd Fix typos in the help text for ".mode" of the CLI. drh 2025-11-25 00:21:27 +00:00
  • b7ed25a86f Do not allow the kvvfs transient flag to flag a previously-non-transient storage as transient. i.e. only applies when first opening a db. Rename the transient flag to delete-on-close to avoid confusion with other meanings of transient in that context. stephan 2025-11-24 20:43:14 +00:00
  • 91c8b974e5 Add the sqlite3_db_filename() to the sqlite3.oo1.DB tracing output. Document an unfortunate design choice which was only recently recognized as such. stephan 2025-11-24 20:36:49 +00:00
  • c4d6f31747 Add kvvfs URI flag transient=1 to cause the storage object to be removed when the last handle to the db is closed. By default it behaves like a filesystem would, retaining the storage objects. stephan 2025-11-24 20:14:23 +00:00
  • 94b621a15a Add the --blob-quote option to the ".mode" command in the CLI. drh 2025-11-24 18:31:13 +00:00
  • d8b323f652 Fix a typeof check so that it works in Worker threads. stephan 2025-11-24 18:17:07 +00:00
  • c340a0f717 Have kvvfs enforce ASCII-only names to avoid truncating multibyte characters in kvvfs's key buffer. stephan 2025-11-24 18:08:25 +00:00
  • e77e6bd0a0 Change some 32-bit integers in fts3_write.c to 64-bit to reduce the chances of integer overflow. dan 2025-11-24 17:44:17 +00:00
  • 4aadef3370 Add the QRF_BLOB_Size encoding for BLOBs in QRF. drh 2025-11-24 16:46:08 +00:00
  • 8f11a71722 Avoid an assert() failure caused by processing a CREATE TABLE AS ... command that generates very long column names. dan 2025-11-24 16:04:07 +00:00
  • 09079ddbc9 Avoid signed integer overflow that may occur in a non-default build when processing a very large CREATE TABLE AS ... statement. dan 2025-11-24 15:40:10 +00:00
  • 72b4d638a5 Get kvvfs v2 storage import working by disallowing it when there are opened db/journal handles. Move import/export out of the JsStorageDb class and into sqlite3_js_kvvfs_import/export_storage(). stephan 2025-11-24 15:17:52 +00:00
  • 10dd61fd91 Show just the list of available modes and omit the current mode display for the ".mode --list" command in the CLI. drh 2025-11-24 13:26:06 +00:00
  • 69537bdef6 In the CLI on the ".mode" command, replace the recently added --no-limits option with "--limits L,C". And add --sw as an alias for --screenwidth. drh 2025-11-24 13:24:58 +00:00
  • eaeaad519d Doc typo fix. stephan 2025-11-24 13:22:26 +00:00
  • 99155974fc Show just the list of available modes and omit the current mode display for the ".mode --list" command in the CLI. commits-to-wrong-branch drh 2025-11-24 13:19:30 +00:00
  • b6685f6e8a Add the fail-on-malloc()-error patch to the autosetup maintenance docs. stephan 2025-11-24 13:10:23 +00:00
  • 843418ae70 In the CLI on the ".mode" command, replace the recently added --no-limits option with "--limits L,C". And add --sw as an alias for --screenwidth. remove-sync-dataonly drh 2025-11-24 12:27:18 +00:00
  • 0ec8c56567 Remove the the SQLITE_SYNC_DATAONLY flag from the core on the grounds that it is not currently used by either built-in VFS and is therefore untested. dan 2025-11-24 11:22:56 +00:00
  • 4f7cd07abb Change our local copy of the third-party jimsh0.c program (used only during the build process) so that it prints an error message and exits if malloc() fails. This does not fix any actual bugs nor make the build process any "safer", but it might help prevent bothersome warnings from pedantic static analyzers. drh 2025-11-24 11:00:02 +00:00
  • 9101b90159 Add the long-missing sqlite3_next_stmt() binding to JS/WASM. stephan 2025-11-23 22:18:26 +00:00
  • 853335af49 More work on kvvfs v2. Db imports work, in the sense that the storage is properly replaced, but the native side is not yet able to recover from that (and how to make it able to do so is not clear). stephan 2025-11-23 22:13:42 +00:00
  • 8679c33355 Add the long-missing sqlite3_next_stmt() binding to JS/WASM. stephan 2025-11-23 22:09:16 +00:00
  • 606b1bd153 Docs, cleanups, and dead code removal. stephan 2025-11-23 20:05:21 +00:00
  • da0d872270 Get the kvvfs v2 working in 64-bit wasm builds (a 0 vs null vs BigInt issue). stephan 2025-11-23 16:54:16 +00:00
  • 274db1fd84 Eliminate the superfluous 'kvvfs-' part of keys for transient storage and cleanup their export a bit. Reminder for later: we could potentially use the dbpage vtab to serialize any db to this JSON-friendly form. stephan 2025-11-23 16:35:18 +00:00
  • d855948547 Initial work on eliminating the superfluous-for-transient-storage kvvfs key prefixes and implementing kvvfs db import. stephan 2025-11-23 15:38:34 +00:00
  • 56a4a2173e Add tests demonstrating basic concurrent use of kvvfs storage and that kvvfs still works after wiping the storage out from under it). stephan 2025-11-23 13:33:56 +00:00
  • ea375f1320 Bump kvvfs's sqlite3_vfs::iVersion to 2 so that its xCurrentTimeInt64() can be used. Add JsStorageDb.exportToObject() to serialize a kvvfs to a JSON-friendly form. stephan 2025-11-23 12:14:18 +00:00
  • 48c8405f99 Replace an alloc/free on every read of a JS kvvfs key with a one-time alloc and a long paragraph explaining why we have to leak it. stephan 2025-11-23 11:28:27 +00:00
  • f63bc3a922 New test case for bSplitColumn in QRF. drh 2025-11-23 10:55:38 +00:00
  • 58a4e08e3d In QRF in bSplitColumn mode, increase the spacing between columns to be as wide as five, for improved legibility, if screen width allows. drh 2025-11-23 00:45:47 +00:00
  • d0056d4234 Use the new "split" mode to simplify and improve the implementation of the ".tables" and ".indexes" commands in the CLI. Fix a bug in QRF that this new implementation found. drh 2025-11-23 00:10:06 +00:00
  • c4190338c5 Add "split" mode in the CLI. Fix CLI commands given on the command line so that they honor --once in prior commands. drh 2025-11-22 23:34:53 +00:00
  • eeb38d3665 Add the --no-limits option to the .mode command in the CLI. drh 2025-11-22 21:47:48 +00:00
  • 946857cfee In QRF, change the name of the bWrapSnglCol flag to bSplitColumn. Similar changes to the TCL interface. drh 2025-11-22 21:34:33 +00:00
  • 2fcc13f8c9 Cherrypick [0b53be562f1e] into trunk. stephan 2025-11-22 19:29:23 +00:00
  • 44fdf80c28 This combination of kvvfs callbacks seems to work okay for both persistent and transient storage, but it's unclear why/how, as xAccess() does not appear to be doing anything useful (and misbehaves when told to report that the storage object in question exists). These tests fail in 64-bit builds for as-yet-unknown reasons (other tests continue to pass in 64-bit). stephan 2025-11-22 19:21:25 +00:00
  • 05478c7149 Fix a misinteraction of CREATE/READONLY flags in the OPFS VFS. stephan 2025-11-22 17:27:16 +00:00
  • 494811810c Ignore semicolons at the end of dot-commands, if the compatibility date is 20251115 or later. [forum:/forumpost/72d084ed552|Forum thread 2025-10-09T21:12:32z] drh 2025-11-22 16:43:52 +00:00
  • 7ae80c0bc1 Fix storage-size counting of non-local/non-session kvvfs storage. Rename the 'global' buildin kvvfs storage object to 'localThread'. stephan 2025-11-22 16:29:45 +00:00
  • c7d155aa5d Cherrypick [e0b33b51229a] for the latest wasmutil/jaccwabyt - all tests are happy. Fix a make deps bug which can break parallel builds involving fiddle. stephan 2025-11-22 15:49:45 +00:00
  • ec274603f1 Incremental work on kvvfs v2. stephan 2025-11-22 07:35:36 +00:00
  • 16d127eb45 Factor KVVfsFile::zName back out. Remove the extraneous part of the storage keys for non-local/non-session storage. stephan 2025-11-22 05:37:21 +00:00
  • fc6096b013 Demonstrate completely transient and a semi-transient (until page reload) kvvfs instances. stephan 2025-11-22 02:43:56 +00:00
  • 7845d312b1 Latest side-stream jaccwabyt/wasmutil. stephan 2025-11-22 02:23:02 +00:00
  • f4197be567 Implementation of bWrapSnglCol in QRF. drh 2025-11-22 00:38:17 +00:00
  • 92fa31bc5f Get initial JS overrides of the kvvfs sqlite3_vfs and sqlite3_io_methods in place. It now tracks a distinct Storage-ish object per sqlite3_file instance. stephan 2025-11-21 22:13:35 +00:00
  • 081a877211 Add the bWrapSnglCol flag to the QRF spec, though it is not yet documented and does not yet work. Fix column output so that it omits trailing space. drh 2025-11-21 20:10:12 +00:00
  • a5e454d11c Need a double-underscore prefix on the cplusplus macro drh 2025-11-21 19:47:13 +00:00
  • 725e6836d0 Fix the qrf.h header so that it is usable from C++ drh 2025-11-21 19:01:26 +00:00
  • 7c07260353 More work towards using JS generic Storage objects as db page storage via kvvfs. stephan 2025-11-21 18:55:33 +00:00
  • 6690972855 Remove kvvfs-specific filename validation from the oo1.DB ctor. stephan 2025-11-21 18:49:58 +00:00
  • 5b19de37b6 Fix typo in the implementation of the ".schema" command of the CLI for the case when there are ATTACH-ed databases. drh 2025-11-21 17:30:44 +00:00
  • 81b7e49d2d Initial restructuring of kvvfs working towards generic support of JS's Strorage interface as storage rather than hard-coding it to just window.localStorage and window.sessionStorage. The eventual goal of that is to have a storage solution which works without the POSIX I/O APIs, getting us one step closer to a wasi-sdk build. It would be transient, like Emscripten's virtual filesystem, and could hypothetically replace our dependency on that particular feature. stephan 2025-11-21 15:23:52 +00:00
  • 794a9b48ac Add new file missing from [3c4061428544]. stephan 2025-11-21 15:03:38 +00:00
  • 873cd21ec3 Enhance ALTER TABLE to support adding and removing NOT NULL and CHECK constraints. drh 2025-11-21 14:15:56 +00:00
  • ac16642cc4 Fix the QRF so that it omits the closing text from styles "json" and "jobject" when the result set it empty. drh 2025-11-21 11:00:29 +00:00
  • 40ce52a4e5 Move the JS pieces of kvvfs into their own file to facilitate pending feature experimentation. stephan 2025-11-21 10:49:32 +00:00
  • 1073985be7 Test cases for the fix in the prior check-in. drh 2025-11-20 22:46:27 +00:00
  • 980580efec Preserve auto-explain mode across mode changes, as has always been the case before. drh 2025-11-20 21:08:46 +00:00
  • a68046e79d Fix hwtime.h (broken by [305bb022368bac9f]) so that unamalgamated windows builds work again. drh 2025-11-20 12:41:26 +00:00
  • 6d62ed4f87 Remove an extraneous loop level from the JS bootstrapping bits. stephan 2025-11-20 12:14:03 +00:00
  • df3fca8da4 Enable the SQLITE_EXPERIMENTAL_PRAGMA_20251114 in the WASM builds for the sake of VFS experimentors. The links in the comments describe what that does. stephan 2025-11-20 12:12:55 +00:00
  • 3df99c4861 Use sqlite3MPrintf() instead of sqlite3_mprintf() internally in alter.c, for improved OOM reporting. alter-table-constraints drh 2025-11-20 11:06:58 +00:00
  • d7e7ab7b5f Additional checks for OOM conditions. drh 2025-11-20 02:03:57 +00:00
  • 6cb88552bc Mark an unreachable branch with NEVER(). drh 2025-11-20 00:56:28 +00:00
  • 325a361d5a Call sqlite3OomFault() rather than setting db->mallocFailed directly. drh 2025-11-19 23:11:56 +00:00
  • c23a1b9bea Fix three harmless declaration-after-statement warnings in the new CLI code. drh 2025-11-19 19:37:28 +00:00
  • 57b61bf78f Improved comments in code. Omit unneeded wrapper functions. drh 2025-11-19 15:25:18 +00:00
  • 3a4c9daa5c Strip unterminated "--" comments from the end of constraints added using ALTER TABLE ADD CONSTRAINT or ADD NOT NULL. dan 2025-11-19 11:31:59 +00:00
  • b58ccaea8a Clarification to the header comment on dropConstraintFunc(). No changes to code. drh 2025-11-19 11:28:48 +00:00
  • 7423111fe1 Trivial simplification to the ALTER TABLE ADD CONSTRAINT code. drh 2025-11-19 10:26:49 +00:00
  • eeab52901c Fix another problem that could follow an OOM fault on this branch. dan 2025-11-18 19:58:56 +00:00
  • b2029ca07d Avoid a segfault that could follow an OOM in an ALTER TABLE statement. dan 2025-11-18 19:48:39 +00:00