]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Sat, 1 Oct 2022 20:27:29 +0000 (20:27 +0000)]
Performance optimization in sqlite3_prepare() (discovered while working
on the stmt-cache branch).
FossilOrigin-Name:
cd494240cc6184bb028d1f1049086f57c0a71a43d7ed1405fd4205240e1b9e61
stephan [Sat, 1 Oct 2022 19:21:52 +0000 (19:21 +0000)]
Correct fiddle db export breakage caused by a post-testing API change made in [
1fa019c88dea ].
FossilOrigin-Name:
e73cc44ec36c7585ebb914bdeed5b39480fca7c7a8d3c4426bfe769c87b98d17
stephan [Sat, 1 Oct 2022 18:55:10 +0000 (18:55 +0000)]
stephan [Sat, 1 Oct 2022 18:47:42 +0000 (18:47 +0000)]
wasm: correct a memleak caused by a shadowed var in the previous checkin. Add a stack-like allocator, sqlite3.capi.wasm.pstack, as a faster way of managing short-lived pointers (like the one which got shadowed).
FossilOrigin-Name:
1fa019c88deac6b6e5155b620bdab1d7145846290daafb9adbefcf4f0fe542cf
stephan [Sat, 1 Oct 2022 16:01:41 +0000 (16:01 +0000)]
Fiddle: fix makefile dependency issue and duplicate inclusion of post-js.js. Reimplement db export using sqlite3_serialize().
FossilOrigin-Name:
29db7de79232c21d19b91bb0fc253114e02e21dd9bf90619453dbe72a4c8bf7f
stephan [Sat, 1 Oct 2022 13:45:14 +0000 (13:45 +0000)]
stephan [Sat, 1 Oct 2022 13:38:27 +0000 (13:38 +0000)]
Tweak sqlite3-worker1.js to be able to load either sqlite3.js or sqlite3-wasmfs.js, noting that the latter still does not load in a Worker because of an Emscripten loader bug.
FossilOrigin-Name:
000ef7059bfb54dc4f829b81a8d8c927c0382980218d8a3d60cd2c4d89151c90
drh [Sat, 1 Oct 2022 13:17:53 +0000 (13:17 +0000)]
Replace the Parse.disableVtab field with Parse.prepFlags for increased
generality, a small size reduction, and a small performance increase.
FossilOrigin-Name:
b7da0bcdf70e53ab1ec00a0694e17c7429e23bc6eb3f39b622d06a930aa2f6a3
stephan [Sat, 1 Oct 2022 12:04:49 +0000 (12:04 +0000)]
stephan [Fri, 30 Sep 2022 23:49:43 +0000 (23:49 +0000)]
Remove a couple of weird quirks of the Worker1 and Promiser APIs. The Worker1 (now undocumented) unlink capability needs to be reevaluated to work equivalently for all storage backends.
FossilOrigin-Name:
9f2b331a32cbaadfd20d04c9908171355322c1aa1d9d6df3628f3b2fb4391ec1
stephan [Fri, 30 Sep 2022 23:02:11 +0000 (23:02 +0000)]
Tweaks to the Worker1 and Promiser APIs prompted by documenting them.
FossilOrigin-Name:
c68b9aa160e2c1197ae7eb06a634017ac2b281393074afa4582762d5458c6889
drh [Fri, 30 Sep 2022 22:40:57 +0000 (22:40 +0000)]
Remove one of the NEVER() macros added by [
5166acf3f0040459 ] because it
is reachable after all.
FossilOrigin-Name:
bd8ae5febbb8d3122f1e2e09b9fcdd6ac20c075ae1cf60bcdbd36080f3736417
drh [Fri, 30 Sep 2022 20:59:09 +0000 (20:59 +0000)]
drh [Fri, 30 Sep 2022 20:53:36 +0000 (20:53 +0000)]
drh [Fri, 30 Sep 2022 20:48:22 +0000 (20:48 +0000)]
Add NEVER() to two error-detection tests that were made unreachable by
the previous check-in.
FossilOrigin-Name:
5166acf3f00404597e77910aee88920ab833af8447766f50bf4f70525606cf95
stephan [Fri, 30 Sep 2022 20:35:37 +0000 (20:35 +0000)]
Add JS wrapper for sqlite3_exec() which knows how to handle a JS callback. Add some console.error() reporting of module-load failures, as they otherwise often get silently swallowed up by the loader's mechanisms. Add 'flexible-string' JS-to-WASM argument converter which performs more X-to-string conversions than the 'string' arg converter does.
FossilOrigin-Name:
96818aa83f4ccc574f558231249ecbdd39763b4351cf4cf6d33f53774a3ee5e6
dan [Fri, 30 Sep 2022 20:15:21 +0000 (20:15 +0000)]
Better handle a case of database corruption where a b-tree page is one of its own ancestor pages.
FossilOrigin-Name:
a24e46804893a7e6e8f3130abca882f9a3aa3b7b2b82aa39a0a20856172766d5
stephan [Fri, 30 Sep 2022 16:49:03 +0000 (16:49 +0000)]
Add sqlite3.version object. Add more state to the Worker #1 config-get response, including sqlite3.version.
FossilOrigin-Name:
711f458d188a0dbe6612069c856ade29323ab426dfa4f80e7b82757ccc474cb8
stephan [Fri, 30 Sep 2022 15:46:08 +0000 (15:46 +0000)]
Add oo1.JsStorageDb.clearStorage/storageSize() methods, copies of capi.sqlite3_web_kvvfs_clear/size().
FossilOrigin-Name:
1e09efe7fa15b8908f8b8353164a8361de778e27ea6c0b11c402bf4e1c56333d
stephan [Fri, 30 Sep 2022 15:24:58 +0000 (15:24 +0000)]
batch-runner.js: force WebSQL batches to not abort for a failed statement (necessary for apples-to-apples-ish benchmark comparisons).
FossilOrigin-Name:
60f0c5cb04d2baf8431e523434d8753e39377f4b2c6bad225c2e5487a4be419b
drh [Fri, 30 Sep 2022 14:35:18 +0000 (14:35 +0000)]
Improvements to the "demoDelete" method in the demovfs, suggested by
[forum:/forumpost/
cad18961c2 |forum post
cad18961c2 ].
FossilOrigin-Name:
d76a301e22e0572262917dfe9557a5051339a65416a473dd2d9989a49975403e
stephan [Fri, 30 Sep 2022 12:10:36 +0000 (12:10 +0000)]
stephan [Fri, 30 Sep 2022 11:01:44 +0000 (11:01 +0000)]
Add oo1.JsStorageDb() as a convenience wrapper for oo1.DB(...,'kvvfs'). Minor doc cleanups.
FossilOrigin-Name:
8a7998709f859a562cf6829485cb9921f8823af0efabe003741348ab1169fb89
stephan [Fri, 30 Sep 2022 10:55:28 +0000 (10:55 +0000)]
wasm: expose sqlite3_de/serialize(), sqlite3_malloc/free() and friends, noting that the former explicitly lies on use of the latter for memory management so is not generically safe for use in wasm.
FossilOrigin-Name:
fbc0edb5d31aa0dea92460e853f15f08c642451a7878994116b530cf172325cc
stephan [Thu, 29 Sep 2022 22:08:22 +0000 (22:08 +0000)]
Add JS infrastructure to ostensibly allow us to customize the wasm imports, which will hypothetically allow us to eliminate the dependency on EM_JS(), but the corresponding Emscripten glue-level feature currently breaks fatally with WASMFS builds so it's disabled.
FossilOrigin-Name:
88d9253b0db5494bf1c9b6d24f22524eeec856b89e64a66ffb30d945f0df21d3
stephan [Thu, 29 Sep 2022 17:35:25 +0000 (17:35 +0000)]
Ensure that the wasm builds always, even when passing -Ox flags from the CLI, use -g3 to avoid problems caused by symbol minification with optimization levels -O2 and higher.
FossilOrigin-Name:
27d24d5d270e272af07d96cf07bdbe79ba07a9c69ba3c70beb76ebf4f90fc97a
stephan [Thu, 29 Sep 2022 16:54:23 +0000 (16:54 +0000)]
Finish eliminating explicit Emscripten module dependencies in test code and fiddle. The only remnant in public code is the Emscripten-generated module load/init interface.
FossilOrigin-Name:
7be78dd4efc410f13ff1ceda1fad82b309cc24de2d5106c8bd6b2adeaa13b106
stephan [Thu, 29 Sep 2022 13:17:50 +0000 (13:17 +0000)]
Rework the Emscripten-emitted module loader/init function such that it passes on the sqlite3 module, instead of the Emscripten module, to the first then() of sqlite3InitModule()'s returned Promise. This eliminates any need to mention the Emscripten module object in client-side code unless they want to configure it in advance for loading-status reports.
FossilOrigin-Name:
0dbaa0e2b5abf5c23e2039ec90a3055ebb3c063aaf4e556c42546defe6fbb86d
drh [Wed, 28 Sep 2022 19:14:01 +0000 (19:14 +0000)]
Fix misuse of the sqlite3_set_auxdata() interface in the ICU extension.
FossilOrigin-Name:
f25cf63471cbed1edb27591e57fead62550d4046dbdcb61312288f0f6f24c646
stephan [Wed, 28 Sep 2022 18:10:50 +0000 (18:10 +0000)]
Wasm: expose sqlite3_exec() and use it to simplify the db-reset logic in batch-runner.js a bit.
FossilOrigin-Name:
2e2821f782511b9d2274a89a5a922582aba18c7e9dc7ce01080e713942a56d7d
stephan [Wed, 28 Sep 2022 17:52:52 +0000 (17:52 +0000)]
More work on batch-runner.html/js to facilitate speed comparisons between various VFSes and WebSQL.
FossilOrigin-Name:
3bd1bc240676e56da87fc49f3c67a1edc4fafcf2a2416298d19ae4f80b676a72
stephan [Wed, 28 Sep 2022 13:01:49 +0000 (13:01 +0000)]
Correct duplicate copies of sqlite3-api.js being embedded in the wasmfs-based builds.
FossilOrigin-Name:
bbfcfba260f39a9c91e82d87e06b1c2cb297c03498b4530aa3e7e01ef9916012
stephan [Wed, 28 Sep 2022 07:53:47 +0000 (07:53 +0000)]
Work around broken -Os wasm builds by adding the -g3 flag. Unrelated documentation tweaks.
FossilOrigin-Name:
f5d6bf8616341037fa3e229edf820d19acef3e0a6207a652b2b143de0a493214
stephan [Tue, 27 Sep 2022 17:03:01 +0000 (17:03 +0000)]
drh [Tue, 27 Sep 2022 16:35:06 +0000 (16:35 +0000)]
Provide the SQLITE_MAX_ALLOCATION_SIZE compile-time option for limiting the
maximum memory allocation size.
FossilOrigin-Name:
584de6a996c78b8e41bdfcd05a8e2a3844664c6b4efedb5883c8b8af388462b5
stephan [Tue, 27 Sep 2022 14:31:34 +0000 (14:31 +0000)]
Comment the -O2 wasm builds as being broken (mysteriously missing JS bits).
FossilOrigin-Name:
f61475ef8244fd1f6553eca9cc2317e5de2cc04443e24afb7b91ebd3fc1bd402
stephan [Tue, 27 Sep 2022 13:40:12 +0000 (13:40 +0000)]
WASM API renaming. Reworked JS API bootstrap's async post-init into a generic mechanism, no longer OPFS-specific.
FossilOrigin-Name:
c42a8cb090cad1108dfd6be574202d744c59e053b505bc4c17252dc6b65d26bf
stephan [Tue, 27 Sep 2022 09:17:37 +0000 (09:17 +0000)]
wasm/js: rename /persistent to /opfs to account for potential future persistent storage options. Minor flag-handling cleanups in the speedtest1 pages. Minor API tweaks in oo1.
FossilOrigin-Name:
4dc972a3656b2a9ec915bfb3f653136560c753ce4024c3f0d0d0c28f66db7a0a
drh [Tue, 27 Sep 2022 01:53:05 +0000 (01:53 +0000)]
Make the legacy FTS3 code more robust against integer overflow during
memory allocation.
FossilOrigin-Name:
5517bc50988b5339c2fd071b29de1b5ca03037b0b635c3b112cf7108fab54d5f
drh [Tue, 27 Sep 2022 00:56:45 +0000 (00:56 +0000)]
Enhance defensive mode so that it disallows CREATE TRIGGER statements if the
statements within the trigger attempt to write on a shadow table.
FossilOrigin-Name:
3283bbd12a60f472ed03cb7c6209a605a3bf9f3d9083371e17840b56e8b3f559
dan [Mon, 26 Sep 2022 20:51:16 +0000 (20:51 +0000)]
Modify implementation of recovery to break recovery of the lost_and_found table into multiple steps.
FossilOrigin-Name:
adedfd040bb2d1c2dcda0b91c6073f12953e45d9b860a8f217d990e861d66dfb
stephan [Mon, 26 Sep 2022 13:55:10 +0000 (13:55 +0000)]
Fiddle: replace db export routine with a C-side one which works for both Emscripten FS-hosted and OPFS-hosted db files. Minor code-adjacent cleanups.
FossilOrigin-Name:
3579a8d6f1f6cd3cd8aad9949536870c5fe7bae8c1778f700dd85d763e266b94
stephan [Mon, 26 Sep 2022 11:38:58 +0000 (11:38 +0000)]
Get fiddle db export working for OPFS VFS. Add root dir handle to the main OPFS VFS worker to enable creation of certain utility functions without delegating to the async worker. Add sqlite3.capi.sqlite3_wasm_rc_str() to map integer result codes back to their SQLITE_xxx counterparts. Minor doc touchups.
FossilOrigin-Name:
9b2244e1c8a40efe6547094a1b57acc8f2173145a8731abb0e36268ce0a8ef41
stephan [Mon, 26 Sep 2022 11:34:31 +0000 (11:34 +0000)]
wasm: change StructBinder signature for sqlite3_file::pMethods from 'P' to 'p' to eliminate an unnecessary and inconsistent level of magic.
FossilOrigin-Name:
85f2e877e53899860af4dc6630044b471a9c7c82faba1f4e1e60ae991460b943
dan [Sat, 24 Sep 2022 19:54:49 +0000 (19:54 +0000)]
Add the SQLITE_RECOVER_SLOWINDEXES option, for specifying that indexes should be created and populated along with tables, instead of separately at the end of the recovery operation.
FossilOrigin-Name:
ad9dba9d1eae786575c7f31e34b342b6f5b26e719bbe27b61609cad8cfd0a505
dan [Sat, 24 Sep 2022 19:17:20 +0000 (19:17 +0000)]
Add sqlite3_recover_step() to header file sqlite3recover.h. Update the API docs in this file.
FossilOrigin-Name:
47f416153035d6bf0ae27587583d2957c87c02caecbd4e7f363bcb2bc27cf159
dan [Sat, 24 Sep 2022 18:05:52 +0000 (18:05 +0000)]
Update things to use sqlite3_recover_step() internally.
FossilOrigin-Name:
f4b15aad3005237b7ac507eed2b9b07e0f5c9407ab28f2656a21c9845f13d35f
stephan [Sat, 24 Sep 2022 11:32:00 +0000 (11:32 +0000)]
Fiddle: move, rather than copy, data buffers between the threads. Fix the case of an uploaded db failing to install because its filename is the same as the opened db.
FossilOrigin-Name:
bcec4f964a7b02f59be05286ff715bac654a32b19f05a743e402f4cdb207cab8
stephan [Sat, 24 Sep 2022 10:15:08 +0000 (10:15 +0000)]
Resolve "already configured" warnings from shell's main() when starting it up in fiddle mode.
FossilOrigin-Name:
114ef3552af977b272a0baddeb9a2326484b60acfc75284e43c55530f86b413f
stephan [Sat, 24 Sep 2022 10:12:19 +0000 (10:12 +0000)]
Reworked out the OPFS async proxy metrics are fetched so that they play more nicely with the tight event-polling loop.
FossilOrigin-Name:
ef503ced5c2ca842be9aea9ef13719a378ed3020e884032db09afee1b8eba0a1
stephan [Sat, 24 Sep 2022 07:36:45 +0000 (07:36 +0000)]
Refactoring towards getting fiddle to support OPFS as a first-class citizen. Certain operations, e.g. import, export, and unlink, are not OPFS-aware.
FossilOrigin-Name:
1b923ed6438d7fef4508936e0c4bc026a368721698b1539961e3fb3140a185cb
dan [Fri, 23 Sep 2022 21:01:10 +0000 (21:01 +0000)]
Internal changes to the recover extension towards a step() style interface.
FossilOrigin-Name:
73926d5c8cd1ecece134b5a73b44ee1dfca74dc200606e3f009b06cdecf8cee9
dan [Fri, 23 Sep 2022 11:40:43 +0000 (11:40 +0000)]
Fix various compiler warnings in new code on this branch.
FossilOrigin-Name:
ae49e9efde3012158061def6e0a8d993abbc5933514a21f84bc10f700f61b5e2
dan [Fri, 23 Sep 2022 11:30:24 +0000 (11:30 +0000)]
Merge latest trunk changes into this branch.
FossilOrigin-Name:
e87fa70ab0f9b95bbcde18567f47906a222a3fd02b4f3c2903d2bb087d361b7c
stephan [Wed, 21 Sep 2022 20:24:12 +0000 (20:24 +0000)]
Reformulate some JS to work around a buggy/broken code transformation in one of the Emscripten-driven code optimizers.
FossilOrigin-Name:
e1249369d5ec1c582c280b1f578b35d53637fdf1cbd97c16d5ed95b136b83e56
stephan [Wed, 21 Sep 2022 19:51:25 +0000 (19:51 +0000)]
Put pieces in place for fiddle to support opfs, but more cleanup is required in the sqlite3.js/fiddle connection. bigIntEnabled now defaults to whether the Emscripten's module has bigint enabled. Add wasm-sensible defaults for several SQLITE_ENABLE/OMIT flags in sqlite3-wasm.c.
FossilOrigin-Name:
7c7fb7535e86b3960eea7f29ab7e6d5197c166b4ee64ad4a9bc0749f2869badc
drh [Wed, 21 Sep 2022 18:21:31 +0000 (18:21 +0000)]
Reduced and improved comments on the constraintCompatibleWithOuterJoin()
function.
FossilOrigin-Name:
38aaf26e082bd95df6b64df43e1772fe6e20c4eb71307dcd97559cac7f11f8f1
stephan [Wed, 21 Sep 2022 16:21:21 +0000 (16:21 +0000)]
shell.c.in: when building in fiddle mode, define _POSIX_SOURCE (ifndef) so that emcc's string.h reveals strdup().
FossilOrigin-Name:
fb85b269c43147f153977606dd8ede7b93744bf955e4c1a2b198907fd8a94620
stephan [Wed, 21 Sep 2022 14:02:47 +0000 (14:02 +0000)]
Correct mistyped --shrink-memory flag in speedtest1-worker. Minor OPFS proxy cleanups.
FossilOrigin-Name:
86e2b55ec9483fa5add51a479c6509d73461f1ac6fca5d49e057b1c66f4314d2
stephan [Wed, 21 Sep 2022 12:27:35 +0000 (12:27 +0000)]
Doc cleanups and additions. Add a way for the OPFS async runner to propagate exception text to the calling thread.
FossilOrigin-Name:
5c5e80652825cf883e6c17809cb98f2bf17d5feac2d263f6f492479154730dab
stephan [Wed, 21 Sep 2022 12:25:40 +0000 (12:25 +0000)]
Added some structure to the wasm demo link list.
FossilOrigin-Name:
777077c4c2249e1ec78390d4f65aaf281c1fbefcef4bcc7609199e995645ceb6
drh [Wed, 21 Sep 2022 09:54:41 +0000 (09:54 +0000)]
The RIGHT JOIN logic added to version 3.39.0 added a new restriction on the
query flattener which resulted in a performance regression for some queries,
as documented by [forum:/forumpost/
96b9e5709cf47cda |forum post
96b9e5709cf47cda ].
This change removes that restriction (thus restoring performance) and fixes the
problem that RIGHT JOIN was having in a different way.
FossilOrigin-Name:
501609eddf2a46d51e8cd56477a22d4df142a166e78fe4322c0db11d1eed6687
stephan [Wed, 21 Sep 2022 08:41:40 +0000 (08:41 +0000)]
Add a link to fiddle.html in the wasm test app index.html.
FossilOrigin-Name:
96c734c07acfbea153d9aaf293a28a2d49d78de19fec4fb90c4c08fb1fd0ddbd
stephan [Wed, 21 Sep 2022 08:39:03 +0000 (08:39 +0000)]
Move fiddle build rules into the wasm-centric build files. Add rule to push wasm bits to the wasm test server.
FossilOrigin-Name:
113f8204dc4ac849d5632d3de1680b6e0da871e107ef484c8d7273799bee3d88
drh [Wed, 21 Sep 2022 00:16:59 +0000 (00:16 +0000)]
Break out the decision of whether or not a constraint term is usable by
an outer join into a subroutine: constraintCompatibleWithOuterJoin().
FossilOrigin-Name:
c7fbc9b0453050e2746af27e3a11e0c3701bef8c56da8e19173242c6ea3aff8b
drh [Tue, 20 Sep 2022 22:19:13 +0000 (22:19 +0000)]
Do not allow EP_InnerON terms to be used on a outer join.
FossilOrigin-Name:
f47aa745690c018800243bf76930b2499ff4537411c4e27b4b16ba3854cc2bf8
drh [Tue, 20 Sep 2022 21:07:52 +0000 (21:07 +0000)]
Add new test cases that (current) get an incorrect answer.
FossilOrigin-Name:
fe5c37736444e397ace387b761ec2491229785d7a437f3f60232aedf9d1f00ec
drh [Tue, 20 Sep 2022 19:45:04 +0000 (19:45 +0000)]
New test cases for query flattening when there are ON clauses and outer joins.
FossilOrigin-Name:
db55387b1972bc7bc6855bd3497af744a111e7d28d09893cd985fbb01be41bcc
drh [Tue, 20 Sep 2022 19:22:17 +0000 (19:22 +0000)]
Modify the OP_IfNotOpen opcode so that the jump is taken if the cursor is open
but was previously set to a NULL row using OP_NullRow.
FossilOrigin-Name:
1292d68caa7086610ddda343f3852e63de8da1eb66536ee4716b6529f5a31bc6
drh [Tue, 20 Sep 2022 18:18:00 +0000 (18:18 +0000)]
Remove code that has been previously commented out.
FossilOrigin-Name:
852b385a5de622aa32026824210d4bd23db52a4a8a697b83d22d6000edeba487
drh [Tue, 20 Sep 2022 17:43:40 +0000 (17:43 +0000)]
Merge the fuzzcheck fix from trunk into the flattener improvement branch.
FossilOrigin-Name:
930a8c1561d0d5dc70dc5378edac77f79ac59ab6569b561de3dfb02f160c38c5
drh [Tue, 20 Sep 2022 17:21:54 +0000 (17:21 +0000)]
Update the fuzz invariant checker to conform to the latest changes in
dbsqlfuzz.
FossilOrigin-Name:
8d8c124349d2a25200ace9a60d76751594b722468ad0c39d927a5d2c6e2464e0
drh [Tue, 20 Sep 2022 16:57:49 +0000 (16:57 +0000)]
Is the query flattener restriction 29 (do not allow both EP_InnerON and
EP_OuterON constraints on the same FROM clause term) really necessary? This
branch explores what happens if we omit that restriction. This is an effort
to address the performance regression reported by
[forum:/forumpost/
96b9e5709cf47cda |forum post
96b9e5709cf47cda ] that is caused
by flattener restriction 29.
FossilOrigin-Name:
19270577ad1d08c9e6e5f0600396b8a1ccda9df1e67a0df845aee6b60437f379
stephan [Tue, 20 Sep 2022 16:20:35 +0000 (16:20 +0000)]
Correct a too-strict is-opfs-available check.
FossilOrigin-Name:
1b5f1b4a6c1457f98c258459e23e321fc59793de298fecb84031b87f02156cd5
stephan [Tue, 20 Sep 2022 16:10:39 +0000 (16:10 +0000)]
Merge kv-vfs-magic-names branch into fiddle-opfs branch and make some kvvfs-relevant tweaks.
FossilOrigin-Name:
e3d36dcdd37e59f17a07d3611d08744eb86f439fab82a648490dd608bcaa3185
stephan [Tue, 20 Sep 2022 14:52:26 +0000 (14:52 +0000)]
Export the sqlite3_uri_...() family of functions to wasm.
FossilOrigin-Name:
72bebc848fce5c3b4766017d016ccb2360de2bd0cb3e47e710c80dbcb6b8b707
stephan [Tue, 20 Sep 2022 14:39:54 +0000 (14:39 +0000)]
Merge opfs-proxy-atomics branch into the fiddle-opfs branch.
FossilOrigin-Name:
25a36920d44544547a84161681cd41e292b4a70df60ac3630791873a79237d98
drh [Tue, 20 Sep 2022 14:36:53 +0000 (14:36 +0000)]
When compiled with SQLITE_OS_KV_OPTIONAL, the magic names ":localStorage:"
and ":sessionStorage:" are recognized and converted to use the kv-vfs.
FossilOrigin-Name:
c5db9262d0388ccb0e84c6a4b4e2e786dd634f13874e4034ba7b175befa4ce90
stephan [Tue, 20 Sep 2022 14:21:58 +0000 (14:21 +0000)]
stephan [Tue, 20 Sep 2022 13:25:39 +0000 (13:25 +0000)]
Speed up de/serialization of func args and return values in the OPFS VFS proxy.
FossilOrigin-Name:
5bf235bbe035e4ace7a54851e190742528af6b4266328a1b8bbb9fb3dd7f2118
stephan [Tue, 20 Sep 2022 10:47:36 +0000 (10:47 +0000)]
OPFS proxy: remove one sanity-checking-only level of proxy function to shave off a few microseconds.
FossilOrigin-Name:
b534831f3efb8910a17e29956e3e87cc80055ea66e15dbef992b6a556ff042f8
stephan [Tue, 20 Sep 2022 10:11:52 +0000 (10:11 +0000)]
Remove extraneous result-code SAB slots. Doc additions.
FossilOrigin-Name:
88de20712bbe3e11ea74af95edc34e9ab9f346f9aa0a30931e5a9e1f96ce57b0
stephan [Tue, 20 Sep 2022 08:27:57 +0000 (08:27 +0000)]
An alternative messaging strategy for the OPFS VFS proxy which uses only SharedArrayBuffer and Atomics, instead of worker messages, for communication (only the initial one-time handshake during initialization uses worker messages). It runs speedtest1 approx. 15-20% faster but still 20-ish% slower than WASMFS.
FossilOrigin-Name:
a83ee3082d89439ea3ad5737e63e25bebb0f91895aca006ce5fecf5b93a2651a
stephan [Tue, 20 Sep 2022 03:31:02 +0000 (03:31 +0000)]
OPFS VFS: further internal refactoring towards experimenting with a new comms model.
FossilOrigin-Name:
5ca412ced24b4e3af5f467e710a597ed440badf7b8335346aade11d3cad3d1a1
stephan [Tue, 20 Sep 2022 01:28:47 +0000 (01:28 +0000)]
OPFS VFS: moved i/o buffer from per-file to the VFS, and related refactoring, in prep for experimentation with a new inter-worker comms model.
FossilOrigin-Name:
d4d63e4580ad8d497310608175308c03c517e051d7865cb66aa0b10356612d7d
drh [Mon, 19 Sep 2022 19:25:15 +0000 (19:25 +0000)]
Clarify comments that describe query flattener restrictions associated with
outer joins. No code changes.
FossilOrigin-Name:
2647d73bb1876d01851f52cb3fd6af08a962ab336b6d51c160d27b1baf94f75f
stephan [Mon, 19 Sep 2022 18:22:29 +0000 (18:22 +0000)]
Further metrics and buffer-copy optimizations in the OPFS proxy, but with little effect.
FossilOrigin-Name:
d1f1fe6f1c60640f7770dfb9245c459a09b8d24ec2ddf664dff77c810bd51f96
drh [Mon, 19 Sep 2022 17:41:59 +0000 (17:41 +0000)]
Fix a minor comment typo. No changes to code or documentation.
FossilOrigin-Name:
8032db4ade66f70a102abb9d3a49e20620e204c45ad7a954a49d20403985bf07
stephan [Mon, 19 Sep 2022 17:09:09 +0000 (17:09 +0000)]
Cut the speedtest1 runtime of the OPFS VFS proxy by approximately 3/4ths via xRead/xWrite buffer-copying optimizations. Still slower than the WASMFS impl by approx. 1/5th.
FossilOrigin-Name:
fb7f287310d74a3e236125ae9c49b859f9263c29ae85161c1bcf9dd0778d8a51
stephan [Mon, 19 Sep 2022 14:56:13 +0000 (14:56 +0000)]
Remove an obsolete file. Update wasmfs build for today's changes. Fix the case that OPFS.xTruncate() is passed a BigInt instead of a Number.
FossilOrigin-Name:
976053925013bf1975f5f9222e28ba648af28e305bb6bdae600eb24d0e136bec
stephan [Mon, 19 Sep 2022 13:44:23 +0000 (13:44 +0000)]
Add sqlite3_web_vfs_list() to JS API. Corrected OPFS VFS's registering itself as the default VFS. speedtest1-worker now uses the xDelete() of both the default VFS and OPFS, to avoid that it starts up with a persistent OPFS test db (the native app calls unlink(), but that unlink call operates on a different virtual filesystem than the OPFS VFS).
FossilOrigin-Name:
2ec7e09139a510b9fd29e4c97283b20740a00f369193c6fecbb734f187e81b48
stephan [Mon, 19 Sep 2022 13:16:35 +0000 (13:16 +0000)]
Merge kv-vfs branch into fiddle-opfs. Adjust various JS APIs and apps to deal with the new method of handling kvvfs. Adjust speedtest1 JS build to include sqlite3-api.js so that it can use kvvfs and opfs VFSes. Permit passing of the vfs as a URL parameter to certain demo/test apps. Milestone: speedtest-worker.html?vfs=opfs runs with the standalone OPFS impl.
FossilOrigin-Name:
ec09f32f7ae2249aaf27388ad2062982afa8bbbb5f88d236d6d9068bf33ad93d
stephan [Mon, 19 Sep 2022 11:47:38 +0000 (11:47 +0000)]
speedtest1: add --vfs NAME flag and eliminate code duplication in argc size verification for all flags which take a value.
FossilOrigin-Name:
281d09867134e0a057cfadd9bfcbf0e21b8ac9737a278c41973d33a3101be7bc
stephan [Mon, 19 Sep 2022 10:13:01 +0000 (10:13 +0000)]
stephan [Mon, 19 Sep 2022 09:58:01 +0000 (09:58 +0000)]
stephan [Mon, 19 Sep 2022 09:25:25 +0000 (09:25 +0000)]
Correct OPFS VFS xRead() to copy the result buffer if the result code is SQLITE_IOERR_SHORT_READ.
FossilOrigin-Name:
56668f9902c6e896b6c63621a444444c6f58ee20f88a5feae97f1699be35892d
stephan [Mon, 19 Sep 2022 05:19:04 +0000 (05:19 +0000)]
Replace OPFS VFS xSleep() impl with a more efficient one (no Worker round-trip needed).
FossilOrigin-Name:
b9773f164878b0a1b7c88cc7a6d1374ea95f64920065e8b2b178a1afffd82fe5
stephan [Mon, 19 Sep 2022 03:57:31 +0000 (03:57 +0000)]
Rename demo-oo1.* to demo-123.* and add demo-123-worker.html, which runs the same demo via a Worker. Doc typo fixes.
FossilOrigin-Name:
2e4a005bd35424caeaa99ace23162cf79e2ebdb159475ffad92b85dc864ad764
stephan [Mon, 19 Sep 2022 00:40:53 +0000 (00:40 +0000)]
Disable build of wasmfs-using components on aarch64 (ARM), as wasmfs won't build there.
FossilOrigin-Name:
9a9eeebc2c27b734041089131b4952d7c0440df48ef32f355641aca61d4b30a0
drh [Sun, 18 Sep 2022 17:59:28 +0000 (17:59 +0000)]
Remove a NEVER macro in defragmentPage() that dbsqlfuzz discovered can be
true. crash-
32d9312f145cdce41613573f6431d9a3e439e3d7
FossilOrigin-Name:
90403759e1cf30f7c11fa8170d6df59a0dd138e1de59d2b60bec7ba15d74f67c