stephan
768c364aaa
Extend kvvfs export to optionally export the raw binary db pages as a list of Uint8Array instead of kvvfs-encoded strings. This is typically much larger but the pages can then be used as-is.
...
FossilOrigin-Name: a4f59496a53a079f8f73e4cde68f47dbd13d2d74de2ad11bc716e7e5c00f1ec0
2025-11-30 03:02:06 +00:00
stephan
6a59bb6057
Add a comment explaining the new kvvfsDecode() return -1 from [cd81cb70525e].
...
FossilOrigin-Name: ed9ab366d1c1880d3c06edce6c0c33ad30c7ae59725c1ec1fe3f620be1835630
2025-11-29 23:41:34 +00:00
stephan
f2ec1d2560
Add a WASM-side export for kvvfsDecode() for pending private use in the kvvfs export bits and ensure that it consistently returns -1 for malformed input.
...
FossilOrigin-Name: cd81cb70525edeb25c4ab287cd5fd03db08ec45fd9e4001cad5c3eadf11505ae
2025-11-29 23:29:07 +00:00
stephan
c4a22d6c14
Merge trunk into the kvvfs-v2 branch.
...
FossilOrigin-Name: 0e1a6ca0f1123da680918027b16608bf87593a9d91f7b1f3fc0c3a454185740d
2025-11-28 22:17:02 +00:00
drh
6fb51919c3
Ensure that the CLI always jumps to the code that frees memory allocations
...
prior to exiting when it encounters errors on the command line - just so
that fuzzers won't call that memory leak, even though it is not.
FossilOrigin-Name: 50eaf4266f184963e85ad6235fb3410bf4992db8b3dc7c92be23a2f143c12a6b
2025-11-27 12:15:22 +00:00
drh
d98f758f40
Fix an utterly harmless memory leak that occurs when the CLI exits due
...
to an error in the command-line arguments.
FossilOrigin-Name: 55942e6d582d421187f2806dc93ea931b64dbb4025203540af654f56d1c9bc36
2025-11-27 11:40:40 +00:00
stephan
77e1e0b4ef
Remove a JS-specific block from os_kv.c.
...
FossilOrigin-Name: 3c1d5eac270e8afe6196ccb11a6d7bb0d1f262c882ce390a16b998bd2f55cb3d
2025-11-26 17:17:22 +00:00
drh
80c1010f88
Add the bBorder option to the QRF spec. Reflect this in the -border
...
option on the TCL format method, and the --border option to ".mode"
in the CLI. Also add the "psql" mode to the CLI.
FossilOrigin-Name: 02cbeb69884cd884d9b1b5f59c4168a3dc24b1a5aecc6967586c0be350b10574
2025-11-26 16:21:56 +00:00
stephan
12572f73d5
Consistently use IsSpace()/IsDigit() instead of isspace()/isdigit() in shell.c.in to squelch warnings on Cygwin. From Jan Nijtmans.
...
FossilOrigin-Name: aa9d7365bb8d8a9d44388dc89dea09428d7cea2f9fba482cb56980b51b16b143
2025-11-26 13:24:10 +00:00
drh
6ef15842cd
Fix subtle inaccuracies in qrfWrapLine(). Omit an unused variable from shell.c.in.
...
FossilOrigin-Name: 5804ba4874cc41b11e8bb559d5533283c2895d2b13316830955663575567f911
2025-11-25 18:20:33 +00:00
stephan
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.
...
FossilOrigin-Name: d391f1ce691fca4504c21a7e3e05a029f247da23d432ee34b0dae14be51d909c
2025-11-25 15:59:58 +00:00
stephan
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.
...
FossilOrigin-Name: ac8af73c16ab821a7aa7d28a5fde8aeba0bc4d03c0af0dd2cff288c8fdabc49e
2025-11-25 15:35:53 +00:00
drh
993b38f0f3
Fixes to .mode in the CLI. "qbox" sets the correct null value.
...
The "--quote on" option sets the null value to NULL.
FossilOrigin-Name: 5454ec46e162247afa178c8532a0fa19eb05897417ac5b3d2a2ed14bfd331a75
2025-11-25 12:16:56 +00:00
drh
b24048ddce
Omit the unused bTextNull flag from the QRF spec object.
...
FossilOrigin-Name: 4bbf176a87b1bedcce0359b70bbf6831a1e458d48c91dcba49f5e00bb38ecaa1
2025-11-25 10:53:39 +00:00
drh
c42259c2bd
Fix typos in the help text for ".mode" of the CLI.
...
FossilOrigin-Name: fddb99c5162ba12a6e3c87e96583d57bae217339b4dd6dc44c3538e738fbf625
2025-11-25 00:21:27 +00:00
drh
94b621a15a
Add the --blob-quote option to the ".mode" command in the CLI.
...
FossilOrigin-Name: 76a986b10d284b25915a07b7150ef1b85f4ef7d48d4e5315b13e7d1532cb97f1
2025-11-24 18:31:13 +00:00
drh
4aadef3370
Add the QRF_BLOB_Size encoding for BLOBs in QRF.
...
FossilOrigin-Name: bafff695d34202377b937cb4ca9f8a7611ae286d9ab927e6c71faa3cd99496e5
2025-11-24 16:46:08 +00:00
dan
8f11a71722
Avoid an assert() failure caused by processing a CREATE TABLE AS ... command that generates very long column names.
...
FossilOrigin-Name: 06554a079d6b299986fc5eeb201595fad14f77c0efcf2d65bd2f36bbc325892c
2025-11-24 16:04:07 +00:00
dan
09079ddbc9
Avoid signed integer overflow that may occur in a non-default build when processing a very large CREATE TABLE AS ... statement.
...
FossilOrigin-Name: b7417497d1fdbf588a8aca8499d27dee560d728a1eafbf44b34fe3b119423d98
2025-11-24 15:40:10 +00:00
drh
10dd61fd91
Show just the list of available modes and omit the current mode display
...
for the ".mode --list" command in the CLI.
FossilOrigin-Name: b9b2761fe79d9cc52365eef6bc34c7442972c5410517ff69926397cc7974ae33
2025-11-24 13:26:06 +00:00
drh
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.
FossilOrigin-Name: cff0978587a4193b57b0384a587bf89174be2fd91cff4d40130babef1dc8431e
2025-11-24 13:24:58 +00:00
stephan
d855948547
Initial work on eliminating the superfluous-for-transient-storage kvvfs key prefixes and implementing kvvfs db import.
...
FossilOrigin-Name: 6bc64059410b1868b7a3576e16d03c02e7c007a2be8b313e386eeb2e2a35c258
2025-11-23 15:38:34 +00:00
stephan
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.
...
FossilOrigin-Name: 393c1beee00ec3b3e98eb385cae0abeb1b34475140c0e8c3d57541d349904436
2025-11-23 12:14:18 +00:00
drh
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.
FossilOrigin-Name: b73df612b621699cd58de6ef327fefdeb8f52eb620f0d2df00d38ff6608a8dd5
2025-11-23 00:10:06 +00:00
drh
c4190338c5
Add "split" mode in the CLI. Fix CLI commands given on the command line
...
so that they honor --once in prior commands.
FossilOrigin-Name: 2530f04d1bb02b800fda83544f5b5dcd42f52b3e56ad625cd03b40e42f24ac6b
2025-11-22 23:34:53 +00:00
drh
eeb38d3665
Add the --no-limits option to the .mode command in the CLI.
...
FossilOrigin-Name: 3cee168e8801481f6d909fb5d20a773b9c6ca0b8daedfc301c9d762a17f9d839
2025-11-22 21:47:48 +00:00
drh
946857cfee
In QRF, change the name of the bWrapSnglCol flag to bSplitColumn.
...
Similar changes to the TCL interface.
FossilOrigin-Name: 76512b3b80fdcaae22340cde0b69857e2a4d7e86a63c6759465bd8a0bcbf82bc
2025-11-22 21:34:33 +00:00
stephan
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).
...
FossilOrigin-Name: 69e591d0054218ead789cee199e5258f1c378a89e4b7b0e38fe74e834e23156b
2025-11-22 19:21:25 +00:00
drh
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]
FossilOrigin-Name: 7a9e753e977ff61ceee50c4e0e5f9b1fc179e91acd9ac88378c888b3e45ebe3a
2025-11-22 16:43:52 +00:00
stephan
ec274603f1
Incremental work on kvvfs v2.
...
FossilOrigin-Name: 60d61cf383b63b25dcfbf8da9539aaec253b6618ec83403f6690b7a32c13363d
2025-11-22 07:35:36 +00:00
stephan
16d127eb45
Factor KVVfsFile::zName back out. Remove the extraneous part of the storage keys for non-local/non-session storage.
...
FossilOrigin-Name: d2bf96d68c6cb2ae68558722edb22192fb1dbbf08fefdb2fd0a4827688e082a8
2025-11-22 05:37:21 +00:00
stephan
fc6096b013
Demonstrate completely transient and a semi-transient (until page reload) kvvfs instances.
...
FossilOrigin-Name: 3f9ff9873303c3900dd3cba6e922bfb8cdb1f595353b692796b62e3025013517
2025-11-22 02:43:56 +00:00
drh
f4197be567
Implementation of bWrapSnglCol in QRF.
...
FossilOrigin-Name: 4bbd3f7ead50c0babd7843f58972e2e1762a84866cc4ed88a2a74375b13da11c
2025-11-22 00:38:17 +00:00
stephan
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.
...
FossilOrigin-Name: 19a3349a2031e2b7fae67847b55643e4f70f8dae863ebc1ace3b09d1f482c8eb
2025-11-21 22:13:35 +00:00
stephan
7c07260353
More work towards using JS generic Storage objects as db page storage via kvvfs.
...
FossilOrigin-Name: 90a33941c69b3581feaed271542f0238ca81ee34fe5b353ca7da48b81ac73a5f
2025-11-21 18:55:33 +00:00
drh
5b19de37b6
Fix typo in the implementation of the ".schema" command of the CLI for the
...
case when there are ATTACH-ed databases.
FossilOrigin-Name: 8a230e4da230a7b103749b069a99a58e4c220873c2f9576abdc928c3538d70b3
2025-11-21 17:30:44 +00:00
stephan
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.
...
FossilOrigin-Name: 190ef4a94005b0feebe865a960d846a1b60ec1b267b15d5a24749f174a6169bc
2025-11-21 15:23:52 +00:00
drh
873cd21ec3
Enhance ALTER TABLE to support adding and removing NOT NULL and CHECK
...
constraints.
FossilOrigin-Name: 895498e4431e02cff65a5d96db22f0b0cb9c96aedf1e3cdcdeb3c34c6fec432b
2025-11-21 14:15:56 +00:00
drh
980580efec
Preserve auto-explain mode across mode changes, as has always been the
...
case before.
FossilOrigin-Name: 8896185ae0b0af8918aa8ce449f18759e6ae60358afbac1019397bae307b15d5
2025-11-20 21:08:46 +00:00
drh
a68046e79d
Fix hwtime.h (broken by [305bb022368bac9f]) so that unamalgamated windows
...
builds work again.
FossilOrigin-Name: 1245319257d03a00eddbc8ff4b43b5813f8a567a12a9957f923bef58c85c0c20
2025-11-20 12:41:26 +00:00
drh
3df99c4861
Use sqlite3MPrintf() instead of sqlite3_mprintf() internally in alter.c,
...
for improved OOM reporting.
FossilOrigin-Name: 57555d75daa2ee8345f8329749841a322b3e57679e5c4899ef749c8bc814812d
2025-11-20 11:06:58 +00:00
drh
d7e7ab7b5f
Additional checks for OOM conditions.
...
FossilOrigin-Name: 8fafd4988bf1fa1aa799c2834dd31bebdd52e7ae8e68c0197ccb497eb9b1e5f6
2025-11-20 02:03:57 +00:00
drh
6cb88552bc
Mark an unreachable branch with NEVER().
...
FossilOrigin-Name: df2259a32fd65986eafceb2c551e6e1661927f1f5b18dbb97c59d9627279eea0
2025-11-20 00:56:28 +00:00
drh
325a361d5a
Call sqlite3OomFault() rather than setting db->mallocFailed directly.
...
FossilOrigin-Name: 4fd5dfa215f14b20ddfc55904acbcc9bc9fd2123bb06fff72ef76efa17304566
2025-11-19 23:11:56 +00:00
drh
c23a1b9bea
Fix three harmless declaration-after-statement warnings in the new CLI code.
...
FossilOrigin-Name: b65b29656c835db22557733f4dcfe906bf21a7a3c36266cbbc7e3277f029b901
2025-11-19 19:37:28 +00:00
drh
57b61bf78f
Improved comments in code. Omit unneeded wrapper functions.
...
FossilOrigin-Name: 3485c7c81bee8e98ea6b403438bcdb2b6fa058afeafea150ce1c859345e1529b
2025-11-19 15:25:18 +00:00
dan
3a4c9daa5c
Strip unterminated "--" comments from the end of constraints added using ALTER TABLE ADD CONSTRAINT or ADD NOT NULL.
...
FossilOrigin-Name: c73ab47b0250c01f1ffa6e506793769744ebeb8ca7edbb78de9a08db2037d6de
2025-11-19 11:31:59 +00:00
drh
b58ccaea8a
Clarification to the header comment on dropConstraintFunc(). No changes
...
to code.
FossilOrigin-Name: 4bd53fbb20d78de7bbff1154e7ee1321b93b0ede435e150ad4ee992a4108ad5a
2025-11-19 11:28:48 +00:00
drh
7423111fe1
Trivial simplification to the ALTER TABLE ADD CONSTRAINT code.
...
FossilOrigin-Name: 383965b3ba701d3627e0bbd09ad04d0ce00d4721497d82e241dc7cffa745b1d9
2025-11-19 10:26:49 +00:00
drh
ec047587e3
Merge the latest trunk changes into the alter-table-constraints branch.
...
FossilOrigin-Name: 31d7aeeaef20ac42c3c395dbaf7a8225ac718256a4cbeb7c198d1c7361766b1b
2025-11-18 19:36:45 +00:00